diff options
author | silverwind <me@silverwind.io> | 2021-11-18 04:26:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 11:26:50 +0800 |
commit | 6874fe90e591fa1bfb4b0575b27d876ab544e6e0 (patch) | |
tree | beabcb9bd531347090c3f678d364cf02099b1274 | |
parent | c98dd7a3e0a08b1e890d6030dd51aae9dd45aaf9 (diff) | |
download | gitea-6874fe90e591fa1bfb4b0575b27d876ab544e6e0.tar.gz gitea-6874fe90e591fa1bfb4b0575b27d876ab544e6e0.zip |
Cleanup and use global style on popups (#17674)
* Cleanup and use global style on popups
- Fix typo 'poping' to 'popping'
- Remove most inline 'data-variation' attributes
- Initialize all popups with 'inverted tiny' variation
* misc tweaks
* rename to .tooltip, use jQuery
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
38 files changed, 129 insertions, 121 deletions
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index 35ab976022..71e5bfbda8 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -29,8 +29,8 @@ <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td> <td>{{.TypeName}}</td> <td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> - <td><span class="poping up" data-content="{{.UpdatedUnix.FormatShort}}" data-variation="tiny">{{.UpdatedUnix.FormatShort}}</span></td> - <td><span class="poping up" data-content="{{.CreatedUnix.FormatLong}}" data-variation="tiny">{{.CreatedUnix.FormatShort}}</span></td> + <td><span class="tooltip" data-content="{{.UpdatedUnix.FormatShort}}">{{.UpdatedUnix.FormatShort}}</span></td> + <td><span class="tooltip" data-content="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td> <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td> </tr> {{end}} diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index f9cda68df4..9fec53b315 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -29,7 +29,7 @@ <td>{{.ID}}</td> <td>{{$.i18n.Tr .TrStr}}</td> <td class="view-detail"><span class="notice-description text truncate">{{.Description}}</span></td> - <td><span class="notice-created-time poping up" data-content="{{.CreatedUnix.AsTime}}" data-variation="inverted tiny">{{.CreatedUnix.FormatShort}}</span></td> + <td><span class="notice-created-time tooltip" data-content="{{.CreatedUnix.AsTime}}">{{.CreatedUnix.FormatShort}}</span></td> <td><a href="#">{{svg "octicon-note" 16 "view-detail"}}</a></td> </tr> {{end}} diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 9475a0cce6..17bd2b936c 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -45,11 +45,11 @@ <div class="menu"> {{range $mode := .AllowedUserVisibilityModes}} {{if $mode.IsPublic}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> {{else if $mode.IsLimited}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> {{else if $mode.IsPrivate}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> {{end}} {{end}} </div> @@ -117,7 +117,7 @@ </div> </div> <div class="inline field"> - <div class="ui checkbox poping up" data-content="{{.i18n.Tr "admin.users.allow_git_hook_tooltip"}}" data-variation="very wide"> + <div class="ui checkbox tooltip" data-content="{{.i18n.Tr "admin.users.allow_git_hook_tooltip"}}" data-variation="very wide"> <label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label> <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}> </div> diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl index 27ad28842a..6e3861fa50 100644 --- a/templates/admin/user/new.tmpl +++ b/templates/admin/user/new.tmpl @@ -39,11 +39,11 @@ <div class="menu"> {{range $mode := .AllowedUserVisibilityModes}} {{if $mode.IsPublic}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> {{else if $mode.IsLimited}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> {{else if $mode.IsPrivate}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> {{end}} {{end}} </div> diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 57ddbf732a..5ce1d0b888 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -1,6 +1,6 @@ <div class="ui container" id="navbar"> <div class="item brand" style="justify-content: space-between;"> - <a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}" data-variation="tiny inverted"> + <a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}"> <img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg"> </a> <div class="ui basic icon button mobile-only" id="navbar-expand-toggle"> @@ -41,7 +41,7 @@ {{if and .IsSigned .MustChangePassword}} <div class="right stackable menu"> - <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> + <div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}"> <span class="text"> {{avatar .SignedUser 24 "tiny"}} <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> @@ -84,23 +84,23 @@ <form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle"> {{.CsrfTokenHtml}} <button - class="ui button mini compact basic icon fitted poping up" + class="ui button mini compact basic icon fitted tooltip" data-content="{{.i18n.Tr "repo.issues.stop_tracking"}}" - data-position="top right" data-variation="small inverted" + data-position="top right" >{{svg "octicon-square-fill"}}</button> </form> <form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> {{.CsrfTokenHtml}} <button - class="ui button mini compact basic icon fitted poping up" + class="ui button mini compact basic icon fitted tooltip" data-content="{{.i18n.Tr "repo.issues.cancel_tracking"}}" - data-position="top right" data-variation="small inverted" + data-position="top right" >{{svg "octicon-trash"}}</button> </form> </div> </div> - <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted"> + <a href="{{AppSubUrl}}/notifications" class="item tooltip" data-content='{{.i18n.Tr "notifications"}}'> <span class="text"> <span class="fitted">{{svg "octicon-bell"}}</span> <span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span> @@ -112,7 +112,7 @@ </span> </a> - <div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted"> + <div class="ui dropdown jump item tooltip" data-content="{{.i18n.Tr "create_new"}}"> <span class="text"> <span class="fitted">{{svg "octicon-plus"}}</span> <span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span> @@ -135,7 +135,7 @@ </div><!-- end content create new menu --> </div><!-- end dropdown menu create new --> - <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> + <div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}"> <span class="text"> {{avatar .SignedUser 24 "tiny"}} <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> diff --git a/templates/install.tmpl b/templates/install.tmpl index ddc6156074..a004e19399 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -186,73 +186,73 @@ </summary> <div class="inline field"> <div class="ui checkbox" id="offline-mode"> - <label class="poping up" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label> <input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="disable-gravatar"> - <label class="poping up" data-content="{{.i18n.Tr "install.disable_gravatar_popup"}}"><strong>{{.i18n.Tr "install.disable_gravatar"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.disable_gravatar_popup"}}"><strong>{{.i18n.Tr "install.disable_gravatar"}}</strong></label> <input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="federated-avatar-lookup"> - <label class="poping up" data-content="{{.i18n.Tr "install.federated_avatar_lookup_popup"}}"><strong>{{.i18n.Tr "install.federated_avatar_lookup"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.federated_avatar_lookup_popup"}}"><strong>{{.i18n.Tr "install.federated_avatar_lookup"}}</strong></label> <input name="enable_federated_avatar" type="checkbox" {{if .enable_federated_avatar}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="enable-openid-signin"> - <label class="poping up" data-content="{{.i18n.Tr "install.openid_signin_popup"}}"><strong>{{.i18n.Tr "install.openid_signin"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.openid_signin_popup"}}"><strong>{{.i18n.Tr "install.openid_signin"}}</strong></label> <input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="disable-registration"> - <label class="poping up" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label> <input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="allow-only-external-registration"> - <label class="poping up" data-content="{{.i18n.Tr "install.allow_only_external_registration_popup"}}"><strong>{{.i18n.Tr "install.allow_only_external_registration_popup"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.allow_only_external_registration_popup"}}"><strong>{{.i18n.Tr "install.allow_only_external_registration_popup"}}</strong></label> <input name="allow_only_external_registration" type="checkbox" {{if .allow_only_external_registration}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="enable-openid-signup"> - <label class="poping up" data-content="{{.i18n.Tr "install.openid_signup_popup"}}"><strong>{{.i18n.Tr "install.openid_signup"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.openid_signup_popup"}}"><strong>{{.i18n.Tr "install.openid_signup"}}</strong></label> <input name="enable_open_id_sign_up" type="checkbox" {{if .enable_open_id_sign_up}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox" id="enable-captcha"> - <label class="poping up" data-content="{{.i18n.Tr "install.enable_captcha_popup"}}"><strong>{{.i18n.Tr "install.enable_captcha"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.enable_captcha_popup"}}"><strong>{{.i18n.Tr "install.enable_captcha"}}</strong></label> <input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label class="poping up" data-content="{{.i18n.Tr "install.require_sign_in_view_popup"}}"><strong>{{.i18n.Tr "install.require_sign_in_view"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.require_sign_in_view_popup"}}"><strong>{{.i18n.Tr "install.require_sign_in_view"}}</strong></label> <input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label class="poping up" data-content="{{.i18n.Tr "install.default_keep_email_private_popup"}}"><strong>{{.i18n.Tr "install.default_keep_email_private"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.default_keep_email_private_popup"}}"><strong>{{.i18n.Tr "install.default_keep_email_private"}}</strong></label> <input name="default_keep_email_private" type="checkbox" {{if .default_keep_email_private}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label class="poping up" data-content="{{.i18n.Tr "install.default_allow_create_organization_popup"}}"><strong>{{.i18n.Tr "install.default_allow_create_organization"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.default_allow_create_organization_popup"}}"><strong>{{.i18n.Tr "install.default_allow_create_organization"}}</strong></label> <input name="default_allow_create_organization" type="checkbox" {{if .default_allow_create_organization}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label class="poping up" data-content="{{.i18n.Tr "install.default_enable_timetracking_popup"}}"><strong>{{.i18n.Tr "install.default_enable_timetracking"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "install.default_enable_timetracking_popup"}}"><strong>{{.i18n.Tr "install.default_enable_timetracking"}}</strong></label> <input name="default_enable_timetracking" type="checkbox" {{if .default_enable_timetracking}}checked{{end}}> </div> </div> diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index d6a0e41417..40c3ed99c3 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -82,7 +82,7 @@ <br> {{range $t, $unit := $.Units}} {{if $unit.Type.UnitGlobalDisabled}} - <div class="field poping up" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"> + <div class="field tooltip" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="field"> {{end}} diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 4c04f1f7b8..0b37f41c28 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -44,7 +44,7 @@ </td> <td class="lines-blame-btn"> {{if $row.PreviousSha}} - <a href="{{$row.PreviousShaURL}}" class="poping up" data-content='{{$.i18n.Tr "repo.blame_prior"}}' data-variation="tiny inverted"> + <a href="{{$row.PreviousShaURL}}" class="tooltip" data-content='{{$.i18n.Tr "repo.blame_prior"}}'> {{svg "octicon-versions"}} </a> {{end}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 5b95f1be72..33a10fa01f 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -25,11 +25,11 @@ </td> <td class="right aligned overflow-visible"> {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} - <div class="ui basic jump button icon poping up show-create-branch-modal" data-content="{{$.i18n.Tr "repo.branch.new_branch_from" ($.DefaultBranch)}}" data-variation="tiny inverted" data-branch-from="{{$.DefaultBranch}}" data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranch}}" data-modal="#create-branch-modal" data-position="top right"> + <div class="ui basic jump button icon tooltip show-create-branch-modal" data-content="{{$.i18n.Tr "repo.branch.new_branch_from" ($.DefaultBranch)}}" data-branch-from="{{$.DefaultBranch}}" data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranch}}" data-modal="#create-branch-modal" data-position="top right"> {{svg "octicon-git-branch"}} </div> {{end}} - <div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch)}}" data-variation="tiny inverted" data-position="top right"> + <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch)}}" data-position="top right"> {{svg "octicon-download"}} <div class="menu"> <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.zip">{{svg "octicon-file-zip"}} ZIP</a> @@ -81,7 +81,7 @@ <td class="three wide right aligned"> {{if not .LatestPullRequest}} {{if .IsIncluded}} - <a class="ui poping up orange large label" data-content="{{$.i18n.Tr "repo.branch.included_desc"}}" data-variation="tiny inverted" data-position="top right"> + <a class="ui tooltip orange large label" data-content="{{$.i18n.Tr "repo.branch.included_desc"}}" data-position="top right"> {{svg "octicon-git-pull-request"}} {{$.i18n.Tr "repo.branch.included"}} </a> {{else if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} @@ -108,12 +108,12 @@ </td> <td class="two wide right aligned overflow-visible"> {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} - <div class="ui basic jump button icon poping up show-create-branch-modal" data-branch-from="{{.Name}}" data-branch-from-urlcomponent="{{PathEscapeSegments .Name}}" data-content="{{$.i18n.Tr "repo.branch.new_branch_from" .Name}}" data-variation="tiny inverted" data-position="top right" data-modal="#create-branch-modal" data-name="{{.Name}}"> + <div class="ui basic jump button icon tooltip show-create-branch-modal" data-branch-from="{{.Name}}" data-branch-from-urlcomponent="{{PathEscapeSegments .Name}}" data-content="{{$.i18n.Tr "repo.branch.new_branch_from" .Name}}" data-position="top right" data-modal="#create-branch-modal" data-name="{{.Name}}"> {{svg "octicon-git-branch"}} </div> {{end}} {{if (not .IsDeleted)}} - <div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.branch.download" (.Name)}}" data-variation="tiny inverted" data-position="top right"> + <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" (.Name)}}" data-position="top right"> {{svg "octicon-download"}} <div class="menu"> <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments .Name}}.zip">{{svg "octicon-file-zip"}} ZIP</a> @@ -123,9 +123,9 @@ {{end}} {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if .IsDeleted}} - <a class="ui basic jump button icon poping up undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{PathEscapeSegments .DeletedBranch.Name}}" data-content="{{$.i18n.Tr "repo.branch.restore" (.Name)}}" data-variation="tiny inverted" data-position="top right"><span class="text blue">{{svg "octicon-reply"}}</span></a> + <a class="ui basic jump button icon tooltip undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{PathEscapeSegments .DeletedBranch.Name}}" data-content="{{$.i18n.Tr "repo.branch.restore" (.Name)}}" data-position="top right"><span class="text blue">{{svg "octicon-reply"}}</span></a> {{else}} - <a class="ui basic jump button icon poping up delete-button delete-branch-button" href data-url="{{$.Link}}/delete?name={{PathEscapeSegments .Name}}" data-content="{{$.i18n.Tr "repo.branch.delete" (.Name)}}" data-variation="tiny inverted" data-position="top right" data-name="{{.Name}}"> + <a class="ui basic jump button icon tooltip delete-button delete-branch-button" href data-url="{{$.Link}}/delete?name={{PathEscapeSegments .Name}}" data-content="{{$.i18n.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> {{svg "octicon-trash"}} </a> {{end}} diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl index 37a88af945..218eb31cb6 100644 --- a/templates/repo/clone_buttons.tmpl +++ b/templates/repo/clone_buttons.tmpl @@ -14,7 +14,7 @@ <input id="repo-clone-url" value="{{if $.PageIsWiki}}{{$.WikiCloneLink.SSH}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly> {{end}} {{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}} - <button class="ui basic icon button poping up" id="clipboard-btn" data-content="{{.i18n.Tr "copy_url"}}" data-clipboard-target="#repo-clone-url"> + <button class="ui basic icon button tooltip" id="clipboard-btn" data-content="{{.i18n.Tr "copy_url"}}" data-clipboard-target="#repo-clone-url"> {{svg "octicon-paste"}} </button> {{end}} diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index edd5f7285a..ff5c32ed13 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -19,7 +19,7 @@ <input type="checkbox" name="all" id="all" value="true" {{.All}}> <label for="all">{{.i18n.Tr "repo.commits.search_all"}} </label> </div> - <button class="ui primary tiny button mr-0 poping up" data-panel="#add-deploy-key-panel" data-content={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button> + <button class="ui primary tiny button mr-0 tooltip" data-panel="#add-deploy-key-panel" data-content={{.i18n.Tr "repo.commits.search.tooltip"}}>{{.i18n.Tr "repo.commits.find"}}</button> </form> {{else if .IsDiffCompare}} <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID | PathEscape}}" class="ui green sha label">{{if not .BaseIsCommit}}{{if .BaseIsBranch}}{{svg "octicon-git-branch"}}{{else if .BaseIsTag}}{{svg "octicon-tag"}}{{end}}{{.BaseBranch}}{{else}}{{ShortSha .BaseBranch}}{{end}}</a> diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 78493629b3..c7aaf54351 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -83,7 +83,7 @@ <input class="hidden" name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}> <label>{{.i18n.Tr "repo.template.git_content"}}</label> </div> - <div class="ui checkbox{{if not .SignedUser.CanEditGitHook}} poping up{{end}}"{{if not .SignedUser.CanEditGitHook}} data-content="{{.i18n.Tr "repo.template.git_hooks_tooltip"}}"{{end}}> + <div class="ui checkbox{{if not .SignedUser.CanEditGitHook}} tooltip{{end}}"{{if not .SignedUser.CanEditGitHook}} data-content="{{.i18n.Tr "repo.template.git_hooks_tooltip"}}"{{end}}> <input class="hidden" name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}> <label>{{.i18n.Tr "repo.template.git_hooks"}}</label> </div> diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 56d6942baa..15bb950aa2 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -38,7 +38,7 @@ {{end}} </div> <!-- todo finish all file status, now modify, add, delete and rename --> - <span class="status {{DiffTypeToStr .GetType}} poping up" data-content="{{DiffTypeToStr .GetType}}" data-variation="inverted tiny" data-position="right center"> </span> + <span class="status {{DiffTypeToStr .GetType}} tooltip" data-content="{{DiffTypeToStr .GetType}}" data-position="right center"> </span> <a class="file mono" href="#diff-{{.Index}}">{{.Name}}</a> </li> {{end}} @@ -87,8 +87,8 @@ <div class="diff-file-header-actions df ac"> {{if $showFileViewToggle}} <div class="ui compact icon buttons"> - <span class="ui tiny basic button poping up file-view-toggle" data-toggle-selector="#diff-source-{{$i}}" data-content="{{$.i18n.Tr "repo.file_view_source"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-code"}}</span> - <span class="ui tiny basic button poping up file-view-toggle active" data-toggle-selector="#diff-rendered-{{$i}}" data-content="{{$.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-file"}}</span> + <span class="ui tiny basic button tooltip file-view-toggle" data-toggle-selector="#diff-source-{{$i}}" data-content="{{$.i18n.Tr "repo.file_view_source"}}" data-position="bottom center">{{svg "octicon-code"}}</span> + <span class="ui tiny basic button tooltip file-view-toggle active" data-toggle-selector="#diff-rendered-{{$i}}" data-content="{{$.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center">{{svg "octicon-file"}}</span> </div> {{end}} {{if $file.IsProtected}} diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl index 1c9b2abd31..d70fc2fe40 100644 --- a/templates/repo/diff/stats.tmpl +++ b/templates/repo/diff/stats.tmpl @@ -1,4 +1,4 @@ {{Add .file.Addition .file.Deletion}} -<span class="diff-stats-bar poping up mx-3" data-content="{{.root.i18n.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}" data-variation="wide"> +<span class="diff-stats-bar tooltip mx-3" data-content="{{.root.i18n.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}" data-variation="wide"> <div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div> </span> diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index a342bb03e0..5e3351c865 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -17,7 +17,7 @@ <div class="divider"> / </div> {{if eq $i $l}} <input id="file-name" value="{{$v}}" placeholder="{{$.i18n.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus> - <span class="poping up" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-info"}}</span> + <span class="tooltip" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center">{{svg "octicon-info"}}</span> {{else}} <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span> {{end}} diff --git a/templates/repo/editor/upload.tmpl b/templates/repo/editor/upload.tmpl index 5fbb42a446..25f3f17df7 100644 --- a/templates/repo/editor/upload.tmpl +++ b/templates/repo/editor/upload.tmpl @@ -15,7 +15,7 @@ <div class="divider"> / </div> {{if eq $i $l}} <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.i18n.Tr "repo.editor.add_subdir"}}" autofocus> - <span class="poping up" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-info"}}</span> + <span class="tooltip" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center">{{svg "octicon-info"}}</span> {{else}} <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span> {{end}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 765de1a146..554456d230 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -45,7 +45,7 @@ {{if $.RepoTransfer}} <form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}"> {{$.CsrfTokenHtml}} - <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center"> <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}green {{end}} ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> {{$.i18n.Tr "repo.transfer.accept"}} </button> @@ -53,7 +53,7 @@ </form> <form method="post" action="{{$.RepoLink}}/action/reject_transfer?redirect_to={{$.RepoLink}}"> {{$.CsrfTokenHtml}} - <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center"> <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}red {{end}}ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> {{$.i18n.Tr "repo.transfer.reject"}} </button> @@ -62,7 +62,7 @@ {{end}} <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} - <div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.watch_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}> + <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.watch_guest_user" }}" data-position="top center"{{end}}> <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.i18n.Tr "repo.watch"}}{{end}} </button> @@ -74,7 +74,7 @@ {{if not $.DisableStars}} <form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} - <div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}> + <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center"{{end}}> <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.i18n.Tr "repo.star"}}{{end}} </button> @@ -85,7 +85,7 @@ </form> {{end}} {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}} - <div class="ui labeled button{{if not $.CanSignedUserFork}} poping up disabled{{end}}"{{if and (not $.CanSignedUserFork) $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{else if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_guest_user"}}"{{end}} data-position="top center" data-variation="tiny" tabindex="0"> + <div class="ui labeled button{{if not $.CanSignedUserFork}} tooltip disabled{{end}}"{{if and (not $.CanSignedUserFork) $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{else if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_guest_user"}}"{{end}} data-position="top center" tabindex="0"> <a class="ui compact small basic button"{{if $.CanSignedUserFork}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}> {{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}} </a> diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 40e782a605..4ba34bc6c5 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -110,7 +110,7 @@ {{if eq $n 0}} <div class="ui action tiny input" id="clone-panel"> {{template "repo/clone_buttons" .}} - <button id="download-btn" class="ui basic jump dropdown icon button poping up" data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted" data-position="top right"> + <button id="download-btn" class="ui basic jump dropdown icon button tooltip" data-content="{{.i18n.Tr "repo.download_archive"}}" data-position="top right"> {{svg "octicon-download"}} <div class="menu"> <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_zip"}}</a> diff --git a/templates/repo/issue/view_content/comments_delete_time.tmpl b/templates/repo/issue/view_content/comments_delete_time.tmpl index 9ece0f43e2..3d17f8ae5d 100644 --- a/templates/repo/issue/view_content/comments_delete_time.tmpl +++ b/templates/repo/issue/view_content/comments_delete_time.tmpl @@ -12,7 +12,7 @@ <div class="ui cancel button">{{.ctx.i18n.Tr "repo.issues.add_time_cancel"}}</div> </div> </div> - <button class="ui icon button compact mini issue-delete-time poping up" data-id="{{.comment.Time.ID}}" data-content="{{.ctx.i18n.Tr "repo.issues.del_time"}}" data-position="top right" data-variation="tiny inverted"> + <button class="ui icon button compact mini issue-delete-time tooltip" data-id="{{.comment.Time.ID}}" data-content="{{.ctx.i18n.Tr "repo.issues.del_time"}}" data-position="top right"> {{svg "octicon-trash"}} </button> </span> diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index a684edfb3a..5a682ea06b 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -34,12 +34,12 @@ </div> <div class="review-item-right"> {{if .Review.Stale}} - <span class="ui poping up type-icon text grey" data-content="{{$.i18n.Tr "repo.issues.is_stale"}}"> + <span class="ui tooltip type-icon text grey" data-content="{{$.i18n.Tr "repo.issues.is_stale"}}"> {{svg "octicon-hourglass" 16 "icon"}} </span> {{end}} {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} - <a href="#" class="ui muted poping up icon dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-content="{{$.i18n.Tr "repo.issues.dismiss_review"}}"> + <a href="#" class="ui muted tooltip icon dismiss-review-btn" data-review-id="dismiss-review-{{.Review.ID}}" data-content="{{$.i18n.Tr "repo.issues.dismiss_review"}}"> {{svg "octicon-x" 16}} </a> <div class="ui small modal" id="dismiss-review-modal"> @@ -72,7 +72,7 @@ {{else}}grey{{end}}"> {{if .CanChange }} - <a href="#" class="ui poping up icon re-request-review {{if .Checked}}checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-content="{{if .Checked}} {{$.i18n.Tr "repo.issues.remove_request_review"}} {{else}} {{$.i18n.Tr "repo.issues.re_request_review"}} {{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> + <a href="#" class="ui tooltip icon re-request-review {{if .Checked}}checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-content="{{if .Checked}} {{$.i18n.Tr "repo.issues.remove_request_review"}} {{else}} {{$.i18n.Tr "repo.issues.re_request_review"}} {{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> {{if .Checked}} {{svg "octicon-trash"}} {{else}} {{svg "octicon-sync"}} {{end}} </a> {{end}} @@ -86,7 +86,7 @@ <div class="ui divider"></div> <div class="review-item"> <div class="review-item-left"> - <a href="{{$.Repository.OriginalURL}}" class="ui poping up" data-content="{{$.i18n.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}"> + <a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.i18n.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}"> <span class="text black "> {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{ .OriginalAuthor }} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index a72a9216a5..6198b6a621 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -23,7 +23,7 @@ {{if .Reviewers}} {{range .Reviewers}} {{if .User}} - <a class="{{if not .CanChange}}ui poping up{{end}} item {{if .Checked}} checked {{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-content="{{$.i18n.Tr "repo.issues.remove_request_review_block"}}"{{end}}> + <a class="{{if not .CanChange}}ui tooltip{{end}} item {{if .Checked}} checked {{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-content="{{$.i18n.Tr "repo.issues.remove_request_review_block"}}"{{end}}> <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span> <span class="text"> {{avatar .User 28 "mr-3"}} @@ -37,7 +37,7 @@ <div class="ui divider"></div> {{range .TeamReviewers}} {{if .Team}} - <a class="{{if not .CanChange}}ui poping up{{end}} item {{if .Checked}} checked {{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-content="{{$.i18n.Tr "repo.issues.remove_request_review_block"}}"{{end}}> + <a class="{{if not .CanChange}}ui tooltip{{end}} item {{if .Checked}} checked {{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-content="{{$.i18n.Tr "repo.issues.remove_request_review_block"}}"{{end}}> <span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check" 16}}</span> <span class="text"> {{svg "octicon-people" 16 "ml-4 mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} @@ -69,7 +69,7 @@ {{- else}}grey{{end}} right "> {{if .CanChange}} - <a href="#" class="ui poping up icon re-request-review {{if .Checked}}checked{{end}}" data-content="{{if .Checked}} {{$.i18n.Tr "repo.issues.remove_request_review"}} {{else}} {{$.i18n.Tr "repo.issues.re_request_review"}} {{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> + <a href="#" class="ui tooltip icon re-request-review {{if .Checked}}checked{{end}}" data-content="{{if .Checked}} {{$.i18n.Tr "repo.issues.remove_request_review"}} {{else}} {{$.i18n.Tr "repo.issues.re_request_review"}} {{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review"> {{if .Checked}} {{svg "octicon-trash"}} {{else}} {{svg "octicon-sync"}} {{end}} </a> {{end}} @@ -79,7 +79,7 @@ {{end}} {{range .OriginalReviews}} <div class="item" style="margin-bottom: 10px;"> - <a href="{{$.Repository.OriginalURL}}" class="ui poping up" data-content="{{$.i18n.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}"> + <a href="{{$.Repository.OriginalURL}}" class="ui tooltip" data-content="{{$.i18n.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe }}"> <span class="text black"> {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{ .OriginalAuthor }} @@ -308,7 +308,7 @@ <span class="text"><strong>{{.i18n.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> <div class="ui list df fw"> {{range .Participants}} - <a class="ui poping up" {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-content="{{.GetDisplayName}}" data-position="top center" data-variation="small inverted"> + <a class="ui tooltip" {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-content="{{.GetDisplayName}}" data-position="top center"> {{avatar . 28 "my-1 mr-2"}} </a> {{end}} @@ -358,7 +358,7 @@ {{.i18n.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}} </div> {{end}} - <button class="ui fluid button poping up issue-start-time" data-content='{{.i18n.Tr "repo.issues.start_tracking"}}' data-position="top center" data-variation="small inverted">{{.i18n.Tr "repo.issues.start_tracking_short"}}</button> + <button class="ui fluid button tooltip issue-start-time" data-content='{{.i18n.Tr "repo.issues.start_tracking"}}' data-position="top center">{{.i18n.Tr "repo.issues.start_tracking_short"}}</button> <div class="ui mini modal issue-start-time-modal"> <div class="header">{{.i18n.Tr "repo.issues.add_time"}}</div> <div class="content"> @@ -373,7 +373,7 @@ <div class="ui red cancel button">{{.i18n.Tr "repo.issues.add_time_cancel"}}</div> </div> </div> - <button class="ui fluid button green poping up issue-add-time mt-3" data-content='{{.i18n.Tr "repo.issues.add_time"}}' data-position="top center" data-variation="small inverted">{{.i18n.Tr "repo.issues.add_time_short"}}</button> + <button class="ui fluid button green tooltip issue-add-time mt-3" data-content='{{.i18n.Tr "repo.issues.add_time"}}' data-position="top center">{{.i18n.Tr "repo.issues.add_time_short"}}</button> {{end}} </div> </div> @@ -411,14 +411,14 @@ {{if ne .Issue.DeadlineUnix 0}} <p> <div class="df sb ac"> - <div class="due-date poping up {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-content="{{.i18n.Tr "repo.issues.due_date_overdue"}}"{{end}}> + <div class="due-date tooltip {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-content="{{.i18n.Tr "repo.issues.due_date_overdue"}}"{{end}}> {{svg "octicon-calendar" 16 "mr-3"}} {{.Issue.DeadlineUnix.FormatDate}} </div> <div> {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - <a class="issue-due-edit poping up muted" data-content="{{$.i18n.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "mr-2"}}</a> - <a class="issue-due-remove poping up muted" data-content="{{$.i18n.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> + <a class="issue-due-edit tooltip muted" data-content="{{$.i18n.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "mr-2"}}</a> + <a class="issue-due-remove tooltip muted" data-content="{{$.i18n.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a> {{end}} </div> </div> @@ -461,7 +461,7 @@ {{end}} {{if .BlockingDependencies}} - <span class="text poping up" data-content="{{if .Issue.IsPull}}{{.i18n.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{.i18n.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}"> + <span class="text tooltip" data-content="{{if .Issue.IsPull}}{{.i18n.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{.i18n.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}"> <strong>{{.i18n.Tr "repo.issues.dependency.blocks_short"}}</strong> </span> <div class="ui relaxed divided list"> @@ -477,7 +477,7 @@ </div> <div class="item-right df ac"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button poping up ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-content="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> + <a class="delete-dependency-button tooltip ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-content="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> {{svg "octicon-trash" 16}} </a> {{end}} @@ -488,7 +488,7 @@ {{end}} {{if .BlockedByDependencies}} - <span class="text poping up" data-content="{{if .Issue.IsPull}}{{.i18n.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{.i18n.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}"> + <span class="text tooltip" data-content="{{if .Issue.IsPull}}{{.i18n.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{.i18n.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}"> <strong>{{.i18n.Tr "repo.issues.dependency.blocked_by_short"}}</strong> </span> <div class="ui relaxed divided list"> @@ -504,7 +504,7 @@ </div> <div class="item-right df ac"> {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} - <a class="delete-dependency-button poping up ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-content="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> + <a class="delete-dependency-button tooltip ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-content="{{$.i18n.Tr "repo.issues.dependency.remove_info"}}" data-inverted=""> {{svg "octicon-trash" 16}} </a> {{end}} diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index c4b391d97a..b43015f1d2 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -34,7 +34,7 @@ {{if .HeadBranchHTMLURL}} {{$headHref = printf "<a href=\"%s\">%s</a>" (.HeadBranchHTMLURL | Escape) $headHref}} {{end}} - {{$headHref = printf "%s <a class=\"poping up\" data-content=\"%s\" data-clipboard-text=\"%s\">%s</a>" $headHref (.i18n.Tr "copy_branch") (.HeadTarget | Escape) (svg "octicon-copy" 14)}} + {{$headHref = printf "%s <a class=\"tooltip\" data-content=\"%s\" data-clipboard-text=\"%s\">%s</a>" $headHref (.i18n.Tr "copy_branch") (.HeadTarget | Escape) (svg "octicon-copy" 14)}} {{$baseHref := .BaseTarget|Escape}} {{if .BaseBranchHTMLURL}} {{$baseHref = printf "<a href=\"%s\">%s</a>" (.BaseBranchHTMLURL | Escape) $baseHref}} diff --git a/templates/repo/projects/view.tmpl b/templates/repo/projects/view.tmpl index f7d699d965..1db52a3d79 100644 --- a/templates/repo/projects/view.tmpl +++ b/templates/repo/projects/view.tmpl @@ -84,7 +84,7 @@ <div class="board-column-header df ac sb"> <div class="ui large label board-label py-2">{{.Title}}</div> {{if and $.CanWriteProjects (not $.Repository.IsArchived) (ne .ID 0)}} - <div class="ui dropdown jump item poping up" data-variation="tiny inverted"> + <div class="ui dropdown jump item tooltip"> <div class="not-mobile px-3" tabindex="-1"> {{svg "octicon-kebab-horizontal"}} </div> diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index b47e7c482c..95f1bea80c 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -159,7 +159,7 @@ <li> <span class="ui text middle aligned right"> <span class="ui text grey">{{.Size | FileSize}}</span> - <span class="poping up" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> + <span class="tooltip" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> {{svg "octicon-info"}} </span> </span> diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 49759713aa..9193389e64 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -68,7 +68,7 @@ <input name="attachment-edit-{{.UUID}}" class="mr-3 attachment_edit" required value="{{.Name}}"/> <input name="attachment-del-{{.UUID}}" type="hidden" value="false"/> <span class="ui text grey mr-3">{{.Size | FileSize}}</span> - <span class="poping up" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> + <span class="tooltip" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> {{svg "octicon-info"}} </span> </div> diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 3b584a559b..228605f184 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -66,7 +66,7 @@ {{.Name}} </a> </div> - <div class="ui eight wide column poping up" data-content="{{$.i18n.Tr "repo.settings.change_team_permission_tip"}}"> + <div class="ui eight wide column tooltip" data-content="{{$.i18n.Tr "repo.settings.change_team_permission_tip"}}"> {{svg "octicon-shield-lock"}} <div class="ui inline dropdown"> <div class="text">{{if eq .Authorize 1}}{{$.i18n.Tr "repo.settings.collaboration.read"}}{{else if eq .Authorize 2}}{{$.i18n.Tr "repo.settings.collaboration.write"}}{{else if eq .Authorize 3}}{{$.i18n.Tr "repo.settings.collaboration.admin"}}{{else if eq .Authorize 4}}{{$.i18n.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.i18n.Tr "repo.settings.collaboration.undefined"}}{{end}}</div> @@ -79,7 +79,7 @@ {{end}} </div> {{if $allowedToChangeTeams}} - <div class="ui two wide column {{if .IncludesAllRepositories}}poping up{{end}}" {{if .IncludesAllRepositories}} data-content="{{$.i18n.Tr "repo.settings.delete_team_tip"}}"{{end}}> + <div class="ui two wide column {{if .IncludesAllRepositories}}tooltip{{end}}" {{if .IncludesAllRepositories}} data-content="{{$.i18n.Tr "repo.settings.delete_team_tip"}}"{{end}}> <button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}"> {{$.i18n.Tr "repo.settings.delete_collaborator"}} </button> diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl index 38f74b8a9c..69db43cf6b 100644 --- a/templates/repo/settings/lfs.tmpl +++ b/templates/repo/settings/lfs.tmpl @@ -27,7 +27,7 @@ <td class="right aligned"> <a class="ui primary show-panel button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.i18n.Tr "repo.settings.lfs_findcommits"}}</a> <button class="ui basic show-modal icon button" data-modal="#delete-{{.Oid}}"> - <span class="btn-octicon btn-octicon-danger poping up" data-content="{{$.i18n.Tr "repo.editor.delete_this_file"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trash"}}</span> + <span class="btn-octicon btn-octicon-danger tooltip" data-content="{{$.i18n.Tr "repo.editor.delete_this_file"}}" data-position="bottom center">{{svg "octicon-trash"}}</span> </button> </td> </tr> diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl index 7d6e531bd2..2d311d59ea 100644 --- a/templates/repo/settings/lfs_locks.tmpl +++ b/templates/repo/settings/lfs_locks.tmpl @@ -27,10 +27,10 @@ <a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $lock.Repo.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a> {{else}} {{svg "octicon-diff"}} - <span class="poping up" title="{{$.i18n.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span> + <span class="tooltip" title="{{$.i18n.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span> {{end}} {{if not (index $.Lockables $index)}} - <span class="poping up" title="{{$.i18n.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert"}}</span> + <span class="tooltip" title="{{$.i18n.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert"}}</span> {{end}} </td> <td> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 211b7da8e7..a762f63161 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -171,7 +171,7 @@ {{$address := MirrorRemoteAddress .}} <td>{{$address.Address}}</td> <td>{{$.i18n.Tr "repo.settings.mirror_settings.direction.push"}}</td> - <td>{{if .LastUpdateUnix}}{{.LastUpdateUnix.AsTime}}{{else}}{{$.i18n.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label poping up" data-content="{{.LastError}}">{{$.i18n.Tr "error"}}</div>{{end}}</td> + <td>{{if .LastUpdateUnix}}{{.LastUpdateUnix.AsTime}}{{else}}{{$.i18n.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label tooltip" data-content="{{.LastError}}">{{$.i18n.Tr "error"}}</div>{{end}}</td> <td class="right aligned"> <form method="post" style="display: inline-block"> {{$.CsrfTokenHtml}} @@ -247,7 +247,7 @@ <div class="inline field"> <label>{{.i18n.Tr "repo.wiki"}}</label> {{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}} - <div class="ui checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui checkbox"> {{end}} @@ -258,7 +258,7 @@ <div class="field {{if not $isWikiEnabled}}disabled{{end}}" id="wiki_box"> <div class="field"> {{if .UnitTypeWiki.UnitGlobalDisabled}} - <div class="ui radio checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui radio checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui radio checkbox"> {{end}} @@ -268,7 +268,7 @@ </div> <div class="field"> {{if .UnitTypeExternalWiki.UnitGlobalDisabled}} - <div class="ui radio checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui radio checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui radio checkbox"> {{end}} @@ -289,7 +289,7 @@ <div class="inline field"> <label>{{.i18n.Tr "repo.issues"}}</label> {{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}} - <div class="ui checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui checkbox"> {{end}} @@ -300,7 +300,7 @@ <div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box"> <div class="field"> {{if .UnitTypeIssues.UnitGlobalDisabled}} - <div class="ui radio checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui radio checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui radio checkbox"> {{end}} @@ -336,7 +336,7 @@ </div> <div class="field"> {{if .UnitTypeExternalTracker.UnitGlobalDisabled}} - <div class="ui radio checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui radio checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui radio checkbox"> {{end}} @@ -381,7 +381,7 @@ <div class="inline field"> <label>{{.i18n.Tr "repo.project_board"}}</label> {{if .UnitTypeProjects.UnitGlobalDisabled}} - <div class="ui checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui checkbox"> {{end}} @@ -397,7 +397,7 @@ <div class="inline field"> <label>{{.i18n.Tr "repo.pulls"}}</label> {{if .UnitTypePullRequests.UnitGlobalDisabled}} - <div class="ui checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> + <div class="ui checkbox tooltip disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}"> {{else}} <div class="ui checkbox"> {{end}} diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index d2fe68738f..8823d6c1dc 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -3,8 +3,8 @@ {{.i18n.Tr "repo.settings.recent_deliveries"}} {{if .Permission.IsAdmin}} <div class="ui right"> - <button class="ui teal tiny button poping up" id="test-delivery" data-content= - "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button> + <button class="ui teal tiny button tooltip" id="test-delivery" data-content= + "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button> </div> {{end}} </h4> diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index afe3306a4d..5ff43426eb 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -22,7 +22,7 @@ </div> {{end}} {{if .LFSLock}} - <div class="file-info-entry ui poping up" data-content="{{.LFSLockHint}}"> + <div class="file-info-entry ui tooltip" data-content="{{.LFSLockHint}}"> {{svg "octicon-lock" 16 "mr-2"}} <a href="{{.LFSLock.Owner.HomeLink}}">{{.LFSLockOwner}}</a> </div> @@ -34,8 +34,8 @@ <div class="file-header-right file-actions df ac"> {{if .HasSourceRenderedToggle}} <div class="ui compact icon buttons two-toggle-buttons"> - <a href="{{$.Link}}?display=source" class="ui mini basic button poping up {{if .IsDisplayingSource}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_source"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-code" 15}}</a> - <a href="{{$.Link}}" class="ui mini basic button poping up {{if .IsDisplayingRendered}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-file" 15}}</a> + <a href="{{$.Link}}?display=source" class="ui mini basic button tooltip {{if .IsDisplayingSource}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_source"}}" data-position="bottom center">{{svg "octicon-code" 15}}</a> + <a href="{{$.Link}}" class="ui mini basic button tooltip {{if .IsDisplayingRendered}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center">{{svg "octicon-file" 15}}</a> </div> {{end}} <div class="ui buttons mr-2"> @@ -48,17 +48,17 @@ {{end}} <a class="ui mini basic button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{PathEscapeSegments .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> </div> - <a download href="{{$.RawFileLink}}"><span class="btn-octicon poping up" data-content="{{.i18n.Tr "repo.download_file"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-download"}}</span></a> + <a download href="{{$.RawFileLink}}"><span class="btn-octicon tooltip" data-content="{{.i18n.Tr "repo.download_file"}}" data-position="bottom center">{{svg "octicon-download"}}</span></a> {{if .Repository.CanEnableEditor}} {{if .CanEditFile}} - <a href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a> + <a href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon tooltip" data-content="{{.EditFileTooltip}}" data-position="bottom center">{{svg "octicon-pencil"}}</span></a> {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span> + <span class="btn-octicon tooltip disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center">{{svg "octicon-pencil"}}</span> {{end}} {{if .CanDeleteFile}} - <a href="{{.RepoLink}}/_delete/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trash"}}</span></a> + <a href="{{.RepoLink}}/_delete/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}"><span class="btn-octicon btn-octicon-danger tooltip" data-content="{{.DeleteFileTooltip}}" data-position="bottom center">{{svg "octicon-trash"}}</span></a> {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trash"}}</span> + <span class="btn-octicon tooltip disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center">{{svg "octicon-trash"}}</span> {{end}} {{end}} </div> diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 80d9fb1172..d0ac4b9507 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -79,7 +79,7 @@ </span> {{end}} {{if ne .DeadlineUnix 0}} - <span class="due-date poping up" data-content="{{$.i18n.Tr "repo.issues.due_date"}}" data-variation="tiny inverted" data-position="right center"> + <span class="due-date tooltip" data-content="{{$.i18n.Tr "repo.issues.due_date"}}" data-position="right center"> <span{{if .IsOverdue}} class="overdue"{{end}}> {{svg "octicon-calendar" 14 "mr-2"}} {{.DeadlineUnix.FormatShort}} @@ -126,7 +126,7 @@ </div> <div class="issue-item-icon-right text grey"> {{range .Assignees}} - <a class="ui assignee poping up" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-variation="inverted" data-position="left center"> + <a class="ui assignee tooltip" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-position="left center"> {{avatar .}} </a> {{end}} diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl index 83a0f6b3ad..5791be9c0f 100644 --- a/templates/user/dashboard/repolist.tmpl +++ b/templates/user/dashboard/repolist.tmpl @@ -31,7 +31,7 @@ {{.i18n.Tr "home.my_repos"}} <span class="ui grey label ml-3">${reposTotalCount}</span> </div> - <a class="poping up" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> + <a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-position="left center"> {{svg "octicon-plus"}} <span class="sr-only">{{.i18n.Tr "new_repo"}}</span> </a> @@ -168,7 +168,7 @@ {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label ml-3">${organizationsTotalCount}</span> </div> - <a v-if="canCreateOrganization" class="poping up" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center"> + <a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-position="left center"> {{svg "octicon-plus"}} <span class="sr-only">{{.i18n.Tr "new_org"}}</span> </a> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index e5962db65c..1c40bd21b5 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -5,7 +5,7 @@ <div class="ui five wide column"> <div class="ui card"> {{if eq .SignedUserName .Owner.Name}} - <a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center"> + <a class="image tooltip" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center"> {{avatar .Owner 290}} </a> {{else}} @@ -54,7 +54,7 @@ {{range .Orgs}} {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}} <li> - <a class="poping up" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"> + <a class="tooltip" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center"> {{avatar .}} </a> </li> diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 20ccea9f00..81f9bf20be 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -58,10 +58,10 @@ </div> <div class="content"> {{if .Verified}} - <span class="poping up" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span> + <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span> {{end}} {{if gt (len .Emails) 0}} - <span class="poping up" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span> + <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span> {{end}} <div class="print meta"> <b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}} diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 0b14e3c0d3..9429db1ad6 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -30,7 +30,7 @@ </div> <div class="inline field"> <div class="ui checkbox" id="keep-email-private"> - <label class="poping up" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label> <input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}> </div> </div> @@ -69,11 +69,11 @@ <div class="menu"> {{range $mode := .AllowedUserVisibilityModes}} {{if $mode.IsPublic}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div> {{else if $mode.IsLimited}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div> {{else if $mode.IsPrivate}} - <div class="item poping up" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> + <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div> {{end}} {{end}} </div> @@ -82,7 +82,7 @@ <div class="field"> <div class="ui checkbox" id="keep-activity-private"> - <label class="poping up" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label> + <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label> <input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}> </div> </div> diff --git a/web_src/js/components/DashboardRepoList.js b/web_src/js/components/DashboardRepoList.js index 12e2ee3cc6..52d9f879ea 100644 --- a/web_src/js/components/DashboardRepoList.js +++ b/web_src/js/components/DashboardRepoList.js @@ -137,7 +137,7 @@ function initVueComponents() { mounted() { this.changeReposFilter(this.reposFilter); - $(this.$el).find('.poping.up').popup(); + $(this.$el).find('.tooltip').popup(); $(this.$el).find('.dropdown').dropdown(); this.setCheckboxes(); Vue.nextTick(() => { diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index ac9d0cc92d..92c9fb8155 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -62,9 +62,8 @@ export function initGlobalCommon() { // Show exact time $('.time-since').each(function () { $(this) - .addClass('poping up') + .addClass('tooltip') .attr('data-content', $(this).attr('title')) - .attr('data-variation', 'inverted tiny') .attr('title', ''); }); @@ -88,7 +87,7 @@ export function initGlobalCommon() { $('.jump.dropdown').dropdown({ action: 'hide', onShow() { - $('.poping.up').popup('hide'); + $('.tooltip').popup('hide'); }, fullTextSearch: 'exact' }); @@ -104,8 +103,17 @@ export function initGlobalCommon() { $('.ui.progress').progress({ showActivity: false }); - $('.poping.up').attr('data-variation', 'inverted tiny').popup(); - $('.top.menu .poping.up').popup({ + + // init popups + $('.tooltip').each((_, el) => { + const $el = $(el); + const attr = $el.attr('data-variation'); + const attrs = attr ? attr.split(' ') : []; + const variations = new Set([...attrs, 'inverted', 'tiny']); + $el.attr('data-variation', [...variations].join(' ')).popup(); + }); + + $('.top.menu .tooltip').popup({ onShow() { if ($('.top.menu .menu.transition').hasClass('visible')) { return false; |