mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-15 19:47:40 +00:00
removed groove
This commit is contained in:
parent
c846f5dcc0
commit
5ef7bad60f
2 changed files with 0 additions and 85 deletions
|
@ -11,7 +11,6 @@ define [
|
|||
"libs/angular-cookie"
|
||||
"libs/passfield"
|
||||
"libs/sixpack"
|
||||
"libs/groove"
|
||||
"libs/angular-sixpack"
|
||||
"libs/ng-tags-input-3.0.0"
|
||||
], () ->
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
!function(window) {
|
||||
|
||||
window.Groove = {
|
||||
|
||||
init: function(options) {
|
||||
this._options = options;
|
||||
if (typeof grooveOnReady != 'undefined') {grooveOnReady();}
|
||||
},
|
||||
|
||||
createTicket: function(params, callback) {
|
||||
var postData = serialize({
|
||||
"ticket[enduser_name]": params["name"],
|
||||
"ticket[enduser_email]": params["email"],
|
||||
"ticket[title]": params["subject"],
|
||||
"ticket[enduser_about]": params["about"],
|
||||
"ticket[label_string]": params["labels"],
|
||||
"ticket[comments_attributes][0][body]": params["message"]
|
||||
});
|
||||
|
||||
sendRequest(this._options.widget_ticket_url, function(req) {
|
||||
if (callback) {callback(req);}
|
||||
}, postData);
|
||||
}
|
||||
};
|
||||
|
||||
// http://www.quirksmode.org/js/xmlhttp.html
|
||||
function sendRequest(url, callback, postData) {
|
||||
var req = createXMLHTTPObject();
|
||||
if (!req) return;
|
||||
var method = (postData) ? "POST" : "GET";
|
||||
req.open(method, url, true);
|
||||
if (postData){
|
||||
try {
|
||||
req.setRequestHeader('Content-type','application/x-www-form-urlencoded');
|
||||
}
|
||||
catch(e) {
|
||||
req.contentType = 'application/x-www-form-urlencoded';
|
||||
};
|
||||
};
|
||||
req.onreadystatechange = function () {
|
||||
if (req.readyState != 4) return;
|
||||
callback(req);
|
||||
}
|
||||
if (req.readyState == 4) return;
|
||||
req.send(postData);
|
||||
}
|
||||
|
||||
var XMLHttpFactories = [
|
||||
function () {return new XDomainRequest()},
|
||||
function () {return new XMLHttpRequest()},
|
||||
function () {return new ActiveXObject("Msxml2.XMLHTTP")},
|
||||
function () {return new ActiveXObject("Msxml3.XMLHTTP")},
|
||||
function () {return new ActiveXObject("Microsoft.XMLHTTP")}
|
||||
];
|
||||
|
||||
function createXMLHTTPObject() {
|
||||
var xmlhttp = false;
|
||||
for (var i = 0; i < XMLHttpFactories.length; i++) {
|
||||
try {
|
||||
xmlhttp = XMLHttpFactories[i]();
|
||||
}
|
||||
catch (e) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return xmlhttp;
|
||||
}
|
||||
|
||||
function serialize(obj) {
|
||||
var str = [];
|
||||
for(var p in obj) {
|
||||
if (obj[p]) {
|
||||
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
|
||||
}
|
||||
}
|
||||
return str.join("&");
|
||||
}
|
||||
|
||||
if (typeof grooveOnLoad != 'undefined') {grooveOnLoad();}
|
||||
}(window);
|
||||
|
||||
Groove.init({"widget_ticket_url":"https://sharelatex-accounts.groovehq.com/widgets/f5ad3b09-7d99-431b-8af5-c5725e3760ce/ticket.json"});
|
||||
|
Loading…
Add table
Reference in a new issue