aboutsummaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
committerUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
commite42fcb033d4a7ee44fe397be3e933d7031b7d8f7 (patch)
treea203fff39c92f947c4585a746e2345b3ebc67b3c /public/js
parent392f3ee21016476fb9794f78882d6c447acb8449 (diff)
downloadgitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.tar.gz
gitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.zip
wiki: finish edit
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js43
1 files changed, 24 insertions, 19 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index d9e00eb713..93af48e37b 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -231,6 +231,11 @@ function initRepository() {
});
}
+ // Wiki
+ if ($('.repository.wiki.view').length > 0) {
+ initFilterSearchDropdown('.choose.page .dropdown');
+ }
+
// Options
if ($('.repository.settings.options').length > 0) {
$('#repo_name').keyup(function () {
@@ -314,23 +319,23 @@ function initRepository() {
$('#edit-title').click(editTitleToggle);
$('#cancel-edit-title').click(editTitleToggle);
$('#save-edit-title').click(editTitleToggle).
- click(function () {
- if ($edit_input.val().length == 0 ||
- $edit_input.val() == $issue_title.text()) {
- $edit_input.val($issue_title.text());
- return false;
- }
+ click(function () {
+ if ($edit_input.val().length == 0 ||
+ $edit_input.val() == $issue_title.text()) {
+ $edit_input.val($issue_title.text());
+ return false;
+ }
- $.post($(this).data('update-url'), {
- "_csrf": csrf,
- "title": $edit_input.val()
- },
- function (data) {
- $edit_input.val(data.title);
- $issue_title.text(data.title);
- });
- return false;
- });
+ $.post($(this).data('update-url'), {
+ "_csrf": csrf,
+ "title": $edit_input.val()
+ },
+ function (data) {
+ $edit_input.val(data.title);
+ $issue_title.text(data.title);
+ });
+ return false;
+ });
// Edit issue or comment content
$('.edit-content').click(function () {
@@ -729,9 +734,9 @@ $(document).ready(function () {
// Show exact time
$('.time-since').each(function () {
$(this).addClass('poping up').
- attr('data-content', $(this).attr('title')).
- attr('data-variation', 'inverted tiny').
- attr('title', '');
+ attr('data-content', $(this).attr('title')).
+ attr('data-variation', 'inverted tiny').
+ attr('title', '');
});
// Semantic UI modules.