Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 72331fb46fe88ff38cdc39352aaa28fa3cbf5a0a Mon Sep 17 00:00:00 2001
From: James Tapper <jamestapper@elvis.local>
Date: Fri, 6 Feb 2009 21:15:29 +0000
Subject: [PATCH] Added a dialogue to Warn users that they are about to upload to a public
web service when using the 'gist' button.
RE bug#58
---
html/views/history/history.css | 18 ++++++++++++++++++
html/views/history/history.js | 15 +++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/html/views/history/history.css b/html/views/history/history.css
index 07c281b..5aa3638 100644
--- a/html/views/history/history.css
+++ b/html/views/history/history.css
@@ -37,6 +37,24 @@ a.servicebutton{
-webkit-border-radius: 2px;
}
+
+a.questionbutton{
+ width: 80px;
+ padding: 2px;
+ margin-bottom: 4px;
+ margin-left: 10px;
+ border: 1px solid #3465a4;
+ background-color: #cce5ff;
+ color: #204a87;
+
+ font-size: 65%;
+ text-decoration: none;
+ text-align: center;
+
+ -webkit-border-radius: 2px;
+}
+
+
#gravatar {
margin-left: 5px;
padding: 2px;
diff --git a/html/views/history/history.js b/html/views/history/history.js
index d11358d..9c03377 100644
--- a/html/views/history/history.js
+++ b/html/views/history/history.js
@@ -45,7 +45,22 @@ var Commit = function(obj) {
};
+
var gistie = function() {
+
+ notify("This will upload the diff to a public service, are you sure?" +
+ "<a class='questionbutton' id='gist' onClick='gistie_confirmed();return false' href='#'>Yes</a>" +
+ "<a class='questionbutton' id='gist' onClick='gistie_nopost();return false' href='#'>No</a>",
+ 0);
+
+}
+
+var gistie_nopost = function() {
+ $("notification").style.display = "none";
+}
+
+var gistie_confirmed = function() {
+
notify("Uploading code to Gistie..", 0);
parameters = {
--
1.6.1.2+GitX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.