From 5f6c4b5450b62e03251299184cdf10a0f7779731 Mon Sep 17 00:00:00 2001 From: benweet Date: Wed, 25 Dec 2013 23:15:38 +0100 Subject: [PATCH] Prepare release --- public/cache.manifest | 2 +- public/res-min/main.js | 60 +++++++++++++++++++------------ public/res-min/themes/default.css | 2 +- public/res-min/themes/gray.css | 2 +- public/res-min/themes/night.css | 2 +- public/res-min/themes/school.css | 2 +- public/res/html/bodyIndex.html | 1 + 7 files changed, 43 insertions(+), 28 deletions(-) diff --git a/public/cache.manifest b/public/cache.manifest index 20184a55..c4b01666 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Mon Dec 23 2013 23:42:18 +#Date Wed Dec 25 2013 23:14:56 CACHE: res/worker.js diff --git a/public/res-min/main.js b/public/res-min/main.js index 01b1dc90..c84ee577 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -20303,7 +20303,7 @@ function() { m = !0; }, l; }), define("text!html/buttonMarkdownSyntax.html", [], function() { - return '\n\n'; + return '\n\n'; }), define("extensions/buttonMarkdownSyntax", [ "jquery", "classes/Extension", "text!html/buttonMarkdownSyntax.html" ], function(e, t, n) { var i = new t("buttonMarkdownSyntax", 'Button "Markdown syntax', !0, !0); return i.settingsBlock = '

Adds a "Markdown syntax" button over the preview.

', @@ -22936,6 +22936,18 @@ function() { }, onEnd: function() { n.welcomeTour = "done"; + var e = t(".button-markdown-syntax").parent().tooltip({ + html: !0, + container: t(".extension-preview-buttons"), + placement: "bottom", + trigger: "manual", + title: "Need help with Markdown syntax?" + }).tooltip("show").addClass("info-tooltip"); + e.one("click", function() { + e.tooltip("hide").removeClass("info-tooltip"); + }), setTimeout(function() { + e.tooltip("hide").removeClass("info-tooltip"); + }, 1e4); }, template: [ '
', '
', '

', '
', ' ", "
" ].join("") }); @@ -23540,7 +23552,7 @@ function() { }); }, r; }), define("text!html/bodyIndex.html", [], function() { - return '\n
\n
\n
\n
\n\n\n\n\n
\n \n \n
\n
\n
\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
'; + return '\n
\n
\n
\n
\n\n\n\n\n
\n \n \n
\n
\n
\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
'; }), define("text!html/bodyViewer.html", [], function() { return '\n\n
\n
\n
\n\n\n\n
\n \n \n
\n
\n
\n
\n
\n\n\n'; }), define("text!html/settingsTemplateTooltip.html", [], function() { @@ -29575,7 +29587,7 @@ function() { o.chain(); }), void 0); } - function c() { + function l() { t.ajax({ url: "https://www.googleapis.com/oauth2/v1/tokeninfo", data: { @@ -29584,7 +29596,7 @@ function() { timeout: n.AJAX_TIMEOUT, type: "GET" }).done(function(e) { - a.getUserId() && a.getUserId() != e.user_id ? h() : (a.setUserId(e.user_id), a.add(r), + a.getUserId() && a.getUserId() != e.user_id ? d() : (a.setUserId(e.user_id), a.add(r), a.token = gapi.auth.getToken(), o.chain(s)); }).fail(function(e) { var t = { @@ -29594,33 +29606,34 @@ function() { p(t, o); }); } - function u() { - m > 5 && (m = 0, f = !1, l.onError("Unable to authenticate user " + a.getUserId() + ", please use login form.")), - f === !1 && (o.timeout = n.ASYNC_TASK_LONG_TIMEOUT); + function c() { + if (f > 5) return o.error(new Error("Unable to authenticate user " + a.getUserId() + ", please sign in with Google.")), + void 0; + h === !1 && (o.timeout = n.ASYNC_TASK_LONG_TIMEOUT); var t = e.chain(y).pick(a.getListWithNew(r)).flatten().value(); gapi.auth.authorize({ client_id: n.GOOGLE_CLIENT_ID, scope: t, - immediate: f, - authuser: f === !1 ? "" : m + immediate: h, + authuser: h === !1 ? "" : f }, function(e) { - !e || e.error ? g === !0 && f === !0 ? (f = !1, o.chain(d)) : o.error(new Error("Access to Google account is not authorized.")) : (f === !0 && m++, - o.chain(c)); + !e || e.error ? g === !0 && h === !0 ? (h = !1, o.chain(u)) : o.error(new Error("Access to Google account is not authorized.")) : (h === !0 && f++, + o.chain(l)); }); } - function d() { - return f === !0 ? (o.chain(u), void 0) : (i.redirectConfirm("You are being redirected to Google authorization page.", function() { - o.chain(u); + function u() { + return h === !0 ? (o.chain(c), void 0) : (i.redirectConfirm("You are being redirected to Google authorization page.", function() { + o.chain(c); }, function() { o.error(new Error("Operation canceled.")); }), void 0); } - function h() { - return f = !0, a.token && a.isAuthorized(r) ? (gapi.auth.setToken(a.token), o.chain(), - void 0) : (a.getUserId() || (f = !1), o.chain(d), void 0); + function d() { + return h = !0, a.token && a.isAuthorized(r) ? (gapi.auth.setToken(a.token), o.chain(), + void 0) : (a.getUserId() || (h = !1), o.chain(u), void 0); } - var f, m = 0; - h(); + var h, f = 0; + d(); }); } function p(t, n) { @@ -29902,11 +29915,11 @@ function() { var e = new google.picker.PickerBuilder(); e.setAppId(n.GOOGLE_DRIVE_APP_ID); var r; - "doc" == i ? (r = new google.picker.DocsView(google.picker.ViewId.DOCS), r.setIncludeFolders(!0), - r.setMimeTypes([ "text/x-markdown", "text/plain", "application/octet-stream", "application/vnd.google-apps.drive-sdk." + n.GOOGLE_DRIVE_APP_ID ].join(",")), + "doc" == i ? (r = new google.picker.DocsView(google.picker.ViewId.DOCS), r.setParent("root"), + r.setIncludeFolders(!0), r.setMimeTypes([ "text/x-markdown", "text/plain", "application/octet-stream", "application/vnd.google-apps.drive-sdk." + n.GOOGLE_DRIVE_APP_ID ].join(",")), e.enableFeature(google.picker.Feature.NAV_HIDDEN), e.enableFeature(google.picker.Feature.MULTISELECT_ENABLED), e.addView(r), e.setOAuthToken(gapi.auth.getToken().access_token)) : "folder" == i ? (r = new google.picker.DocsView(google.picker.ViewId.FOLDERS), - r.setIncludeFolders(!0), r.setSelectFolderEnabled(!0), r.setMimeTypes("application/vnd.google-apps.folder"), + r.setParent("root"), r.setIncludeFolders(!0), r.setSelectFolderEnabled(!0), r.setMimeTypes("application/vnd.google-apps.folder"), e.enableFeature(google.picker.Feature.NAV_HIDDEN), e.addView(r), e.setOAuthToken(gapi.auth.getToken().access_token)) : "img" == i && (r = new google.picker.PhotosView(), r.setType("flat"), e.addView(r), r = new google.picker.PhotosView(), r.setType("ofuser"), e.addView(r), e.addView(google.picker.ViewId.PHOTO_UPLOAD)), e.setCallback(function(e) { @@ -30191,7 +30204,8 @@ function() { s.prop("disabled", r.prop("checked")); }); var y = i.retrieveIgnoreError(h + ".state"); - if (void 0 !== y) if (o.removeItem(h + ".state"), "create" == y.action) u.upload(void 0, y.folderId, n.GDRIVE_DEFAULT_FILE_TITLE, a.defaultContent, void 0, void 0, b, function(e, t) { + if (void 0 !== y && y.userId == o[b + ".userId"]) if (o.removeItem(h + ".state"), + "create" == y.action) u.upload(void 0, y.folderId, n.GDRIVE_DEFAULT_FILE_TITLE, a.defaultContent, void 0, void 0, b, function(e, t) { if (!e) { var n = m(t.id, t.etag, t.content, t.title), i = {}; i[n.syncIndex] = n; diff --git a/public/res-min/themes/default.css b/public/res-min/themes/default.css index 7cb9e93c..51c936da 100644 --- a/public/res-min/themes/default.css +++ b/public/res-min/themes/default.css @@ -1396,7 +1396,7 @@ a.list-group-item:hover,a.list-group-item:focus{color:#036;border-top-color:rgba .btn-default:hover,.btn-default:focus,.btn-default:active,.open .btn-default.dropdown-toggle{color:#036;border-color:rgba(0,128,255,0.1);background-color:rgba(102,128,153,0.04) !important} .btn-primary:hover,.btn-primary:focus,.btn-primary:active,.open .btn-primary.dropdown-toggle{color:#036;border-color:rgba(0,128,255,0.1);background-color:#dae3eb !important} .btn-success:hover,.btn-success:focus,.btn-success:active,.open .btn-success.dropdown-toggle{color:#036;border-color:rgba(0,128,255,0.1);background-color:rgba(89,128,166,0.075) !important} -.btn-info:hover,.btn-info:focus,.btn-info:active,.open .btn-info.dropdown-toggle{color:#036;border-color:rgba(0,128,255,0.1);background-color:#f0f2f5 !important} +.btn-info:hover,.btn-info:focus,.btn-info:active,.info-tooltip .btn-info,.open .btn-info.dropdown-toggle{color:#036;border-color:rgba(0,128,255,0.1);background-color:#f0f2f5 !important} .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:0} .btn-group>.btn+.dropdown-toggle{padding-right:11px;padding-left:11px} .form-inline .form-control{display:inline-block} diff --git a/public/res-min/themes/gray.css b/public/res-min/themes/gray.css index c0fa6fa4..3e4f23d7 100644 --- a/public/res-min/themes/gray.css +++ b/public/res-min/themes/gray.css @@ -1396,7 +1396,7 @@ a.list-group-item:hover,a.list-group-item:focus{color:#343434;border-top-color:r .btn-default:hover,.btn-default:focus,.btn-default:active,.open .btn-default.dropdown-toggle{color:#343434;border-color:rgba(128,128,128,0.1);background-color:rgba(128,128,128,0.04) !important} .btn-primary:hover,.btn-primary:focus,.btn-primary:active,.open .btn-primary.dropdown-toggle{color:#343434;border-color:rgba(128,128,128,0.1);background-color:#e3e3e3 !important} .btn-success:hover,.btn-success:focus,.btn-success:active,.open .btn-success.dropdown-toggle{color:#343434;border-color:rgba(128,128,128,0.1);background-color:rgba(128,128,128,0.075) !important} -.btn-info:hover,.btn-info:focus,.btn-info:active,.open .btn-info.dropdown-toggle{color:#343434;border-color:rgba(128,128,128,0.1);background-color:#f3f3f3 !important} +.btn-info:hover,.btn-info:focus,.btn-info:active,.info-tooltip .btn-info,.open .btn-info.dropdown-toggle{color:#343434;border-color:rgba(128,128,128,0.1);background-color:#f3f3f3 !important} .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:0} .btn-group>.btn+.dropdown-toggle{padding-right:11px;padding-left:11px} .form-inline .form-control{display:inline-block} diff --git a/public/res-min/themes/night.css b/public/res-min/themes/night.css index f1c05578..e3d097d5 100644 --- a/public/res-min/themes/night.css +++ b/public/res-min/themes/night.css @@ -1396,7 +1396,7 @@ a.list-group-item:hover,a.list-group-item:focus{color:#b3b3b3;border-top-color:r .btn-default:hover,.btn-default:focus,.btn-default:active,.open .btn-default.dropdown-toggle{color:#b3b3b3;border-color:rgba(255,255,255,0.1);background-color:rgba(255,255,255,0.04) !important} .btn-primary:hover,.btn-primary:focus,.btn-primary:active,.open .btn-primary.dropdown-toggle{color:#b3b3b3;border-color:rgba(255,255,255,0.1);background-color:#525252 !important} .btn-success:hover,.btn-success:focus,.btn-success:active,.open .btn-success.dropdown-toggle{color:#b3b3b3;border-color:rgba(255,255,255,0.1);background-color:rgba(255,255,255,0.075) !important} -.btn-info:hover,.btn-info:focus,.btn-info:active,.open .btn-info.dropdown-toggle{color:#b3b3b3;border-color:rgba(255,255,255,0.1);background-color:#3a3a3a !important} +.btn-info:hover,.btn-info:focus,.btn-info:active,.info-tooltip .btn-info,.open .btn-info.dropdown-toggle{color:#b3b3b3;border-color:rgba(255,255,255,0.1);background-color:#3a3a3a !important} .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:0} .btn-group>.btn+.dropdown-toggle{padding-right:11px;padding-left:11px} .form-inline .form-control{display:inline-block} diff --git a/public/res-min/themes/school.css b/public/res-min/themes/school.css index ee24da92..61ae94fa 100644 --- a/public/res-min/themes/school.css +++ b/public/res-min/themes/school.css @@ -1396,7 +1396,7 @@ a.list-group-item:hover,a.list-group-item:focus{color:#2d2d2d;border-top-color:r .btn-default:hover,.btn-default:focus,.btn-default:active,.open .btn-default.dropdown-toggle{color:#2d2d2d;border-color:rgba(121,121,121,0.1);background-color:rgba(143,121,104,0.04) !important} .btn-primary:hover,.btn-primary:focus,.btn-primary:active,.open .btn-primary.dropdown-toggle{color:#2d2d2d;border-color:rgba(121,121,121,0.1);background-color:#dcdcdc !important} .btn-success:hover,.btn-success:focus,.btn-success:active,.open .btn-success.dropdown-toggle{color:#2d2d2d;border-color:#305145;background-color:#437160 !important} -.btn-info:hover,.btn-info:focus,.btn-info:active,.open .btn-info.dropdown-toggle{color:#2d2d2d;border-color:rgba(121,121,121,0.1);background-color:#f1eeec !important} +.btn-info:hover,.btn-info:focus,.btn-info:active,.info-tooltip .btn-info,.open .btn-info.dropdown-toggle{color:#2d2d2d;border-color:rgba(121,121,121,0.1);background-color:#f1eeec !important} .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:0} .btn-group>.btn+.dropdown-toggle{padding-right:11px;padding-left:11px} .form-inline .form-control{display:inline-block} diff --git a/public/res/html/bodyIndex.html b/public/res/html/bodyIndex.html index cc7f8bef..d2d50c54 100644 --- a/public/res/html/bodyIndex.html +++ b/public/res/html/bodyIndex.html @@ -1034,6 +1034,7 @@ + Please sign in with Google first. Once linked with your Google accounts, changing account is not possible unless you reset the application.