From 65cff038a38815f3ccd1b81b3443801d16fba116 Mon Sep 17 00:00:00 2001
From: Wu Cheng-Han
Date: Sat, 30 Jul 2016 12:19:42 +0800
Subject: Update bootstrap to 3.3.7 and jQuery to 3.1.0 with related patches
---
public/css/site.css | 2 +-
public/js/index.js | 50 ++++++++++++++++++++++-----------------------
public/views/body.ejs | 4 ++--
public/views/foot.ejs | 4 ++--
public/views/head.ejs | 6 +++---
public/views/header.ejs | 8 ++++----
public/views/html.hbs | 12 +++++------
public/views/index.ejs | 6 +++---
public/views/pretty.ejs | 12 +++++------
public/views/slide.ejs | 2 +-
public/views/statusbar.html | 6 +++---
11 files changed, 56 insertions(+), 56 deletions(-)
(limited to 'public')
diff --git a/public/css/site.css b/public/css/site.css
index 7b569355..e7702c46 100644
--- a/public/css/site.css
+++ b/public/css/site.css
@@ -10,7 +10,7 @@ body {
font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
letter-spacing: 0.025em;
}
-:focus {
+:focus, .focus {
outline: none !important;
}
::-moz-focus-inner {
diff --git a/public/js/index.js b/public/js/index.js
index 3ad16e45..9eab93bb 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -810,10 +810,10 @@ $(window).resize(function () {
windowResize();
});
//when page unload
-$(window).unload(function () {
+$(window).on('unload', function () {
updateHistoryInner();
});
-$(window).error(function () {
+$(window).on('error', function () {
//setNeedRefresh();
});
@@ -1357,7 +1357,7 @@ ui.toolbar.export.gist.attr("href", noteurl + "/gist");
ui.toolbar.export.snippet.click(function() {
ui.spinner.show();
$.get(serverurl + '/auth/gitlab/callback/' + noteid + '/projects')
- .success(function (data) {
+ .done(function (data) {
$("#snippetExportModalAccessToken").val(data.accesstoken);
$("#snippetExportModalBaseURL").val(data.baseURL);
$("#snippetExportModalLoading").hide();
@@ -1380,10 +1380,10 @@ ui.toolbar.export.snippet.click(function() {
}
$("#snippetExportModalLoading").hide();
})
- .error(function (data) {
+ .fail(function (data) {
showMessageModal(' Import from Snippet', 'Unable to fetch gitlab parameters :(', '', '', false);
})
- .complete(function () {
+ .always(function () {
ui.spinner.hide();
});
});
@@ -1443,7 +1443,7 @@ ui.toolbar.import.gist.click(function () {
ui.toolbar.import.snippet.click(function () {
ui.spinner.show();
$.get(serverurl + '/auth/gitlab/callback/' + noteid + '/projects')
- .success(function (data) {
+ .done(function (data) {
$("#snippetImportModalAccessToken").val(data.accesstoken);
$("#snippetImportModalBaseURL").val(data.baseURL);
$("#snippetImportModalContent").prop('disabled', false);
@@ -1468,10 +1468,10 @@ ui.toolbar.import.snippet.click(function () {
}
$("#snippetImportModalLoading").hide();
})
- .error(function (data) {
+ .fail(function (data) {
showMessageModal(' Import from Snippet', 'Unable to fetch gitlab parameters :(', '', '', false);
})
- .complete(function () {
+ .always(function () {
ui.spinner.hide();
});
});
@@ -1503,14 +1503,14 @@ var revision = null;
var revisionTime = null;
ui.modal.revision.on('show.bs.modal', function (e) {
$.get(noteurl + '/revision')
- .success(function(data) {
+ .done(function(data) {
parseRevisions(JSON.parse(data).revision);
initRevisionViewer();
})
- .error(function(err) {
+ .fail(function(err) {
})
- .complete(function() {
+ .always(function() {
//na
});
});
@@ -1555,7 +1555,7 @@ function parseRevisions(_revisions) {
function selectRevision(time) {
if (time == revisionTime) return;
$.get(noteurl + '/revision/' + time)
- .success(function(data) {
+ .done(function(data) {
revision = JSON.parse(data);
revisionTime = time;
var lastScrollInfo = revisionViewer.getScrollInfo();
@@ -1613,10 +1613,10 @@ function selectRevision(time) {
revisionInsertAnnotation.update(revisionInsert);
revisionDeleteAnnotation.update(revisionDelete);
})
- .error(function(err) {
+ .fail(function(err) {
})
- .complete(function() {
+ .always(function() {
//na
});
}
@@ -1662,7 +1662,7 @@ ui.modal.snippetImportProjects.change(function() {
$("#snippetImportModalLoading").show();
$("#snippetImportModalContent").val('/projects/' + project);
$.get(baseURL + '/api/v3/projects/' + project + '/snippets?access_token=' + accesstoken)
- .success(function(data) {
+ .done(function(data) {
$("#snippetImportModalSnippets").find('option').remove().end().append('');
data.forEach(function(snippet) {
$('