Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 03fa592
Showing
233 changed files
with
47,808 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= google_docs_plugin | ||
|
||
Description goes here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<a href="#" rel="<%= User.current.googledocs_preference(:account_email) %>" style="display:none" id="gdocs_email"> | ||
|
||
<%= stylesheet_link_tag "/plugin_assets/redmine_google_docs_plugin/stylesheets/modalbox-lib.css"%> | ||
<%= javascript_include_tag("http://www.google.com/jsapi").sub('.js', '')%> | ||
<%= javascript_tag "google.load('gdata', '2.x');"%> | ||
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js"%> | ||
<%= javascript_include_tag "/plugin_assets/redmine_google_docs_plugin/javascripts/modalbox-lib.js"%> | ||
<%= javascript_include_tag "/plugin_assets/redmine_google_docs_plugin/javascripts/googledocs.js" %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h3><%=l(:google_docs)%></h3> | ||
<div class="box tabular"> | ||
<p> | ||
<%= label :googledocs, :account_email %> | ||
<%= text_field :googledocs, :account_email, :value => account_email %> | ||
</p> | ||
</div> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
function handleFeed(response) { | ||
|
||
var entries = response.feed.entry; | ||
|
||
if (!entries.length) { | ||
|
||
alert('no documents found'); | ||
return; | ||
} | ||
|
||
var html = []; | ||
|
||
for (var i = 0, entry; entry = entries[i]; i++) { | ||
var title = entry.title.$t; | ||
|
||
$('docs').insert('<li rel="' + entry.link[0].href + '">' + title + '</li>') | ||
} | ||
|
||
console.log(response); | ||
|
||
} | ||
|
||
|
||
function handleError(e) { | ||
|
||
|
||
|
||
} | ||
|
||
document.observe('dom:loaded', function() { | ||
|
||
var email = $('gdocs_email').readAttribute('rel'); | ||
|
||
if (email.length == 0) | ||
return; | ||
|
||
|
||
$('issue_custom_field_values_1').observe('click', function() { | ||
|
||
|
||
try { | ||
Modalbox.show('<div><ul id="docs"></ul></div>', { | ||
doNotMove: true, | ||
title: 'Search your Google Docs', | ||
overlayDuration: 0.0, | ||
slideDownDuration: 0.0, | ||
slideUpDuration: 0.0, | ||
resizeDuration: 0.0, | ||
overlayOpacity: 0.01, | ||
autoFocusing: false, | ||
afterLoad: function(){ | ||
|
||
|
||
var scope = 'https://docs.google.com/feeds/'; | ||
start = new Date().getTime(); | ||
if (google.accounts.user.checkLogin(scope)) { | ||
var service = new google.gdata.client.GoogleService('writely', 'DocList-App-v2.0'); | ||
service.getFeed(scope + 'documents/private/full/', handleFeed, handleError); | ||
} else { | ||
var token = google.accounts.user.login(scope); // can ignore returned token | ||
} | ||
|
||
console.log('test'); | ||
|
||
} | ||
|
||
}); | ||
} catch (e) { | ||
|
||
console.log(e); | ||
|
||
} | ||
|
||
}); | ||
|
||
|
||
|
||
}); |
Oops, something went wrong.