summaryrefslogtreecommitdiff
path: root/addons/google_docs/static
diff options
context:
space:
mode:
authorVidhin Mehta <vme@tinyerp.com>2013-08-23 10:36:02 +0530
committerVidhin Mehta <vme@tinyerp.com>2013-08-23 10:36:02 +0530
commit75ddd5ccbec73c4a671b6a74efaa3d41dc2ea2db (patch)
tree50ed3620df15e8533760f5d47e754a1d39c1e856 /addons/google_docs/static
parent42f27a15275effd9c43dfe99e32c395ca6b3fd8a (diff)
parenta7f4b6aaa0359d12046e81183417c24f093cd7c3 (diff)
[MERGE]Trunk.
bzr revid: vme@tinyerp.com-20130823050602-33bqv07e7g8dhv7x
Diffstat (limited to 'addons/google_docs/static')
-rw-r--r--addons/google_docs/static/src/js/gdocs.js40
-rw-r--r--addons/google_docs/static/src/xml/gdocs.xml8
2 files changed, 0 insertions, 48 deletions
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js
deleted file mode 100644
index 1cc511ef4d9..00000000000
--- a/addons/google_docs/static/src/js/gdocs.js
+++ /dev/null
@@ -1,40 +0,0 @@
-openerp.google_docs = function(instance, m) {
-var _t = instance.web._t,
- QWeb = instance.web.qweb;
-
- instance.web.Sidebar.include({
- redraw: function() {
- var self = this;
- this._super.apply(this, arguments);
- self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('AddGoogleDocumentItem', {widget: self}))
- self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
- self.on_google_doc();
- });
- },
- on_google_doc: function() {
- var self = this;
- var view = self.getParent();
- var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
- if( !_.isEmpty(ids) ){
- view.sidebar_eval_context().done(function (context) {
- var ds = new instance.web.DataSet(this, 'ir.attachment', context);
- ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
- if (r == 'False') {
- var params = {
- error: response,
- message: _t("The user google credentials are not set yet. Contact your administrator for help.")
- }
- $(openerp.web.qweb.render("DialogWarning", params)).dialog({
- title: _t("User Google credentials are not yet set."),
- modal: true,
- });
- }
- }).done(function(r){
- window.open(r.url,"_blank");
- view.reload();
- });
- });
- }
- }
- });
-};
diff --git a/addons/google_docs/static/src/xml/gdocs.xml b/addons/google_docs/static/src/xml/gdocs.xml
deleted file mode 100644
index 0c8d9c3b01f..00000000000
--- a/addons/google_docs/static/src/xml/gdocs.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vim:fdl=1:
--->
-<templates id="template" xml:space="preserve">
-<t t-name="AddGoogleDocumentItem">
- <li class="oe_sidebar_add_google_doc"><span><b>Add Google Doc...</b></span></li>
-</t>
-</templates>