<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_container</string> </key>
                                <value> <string>container</string> </value>
                            </item>
                            <item>
                                <key> <string>name_context</string> </key>
                                <value> <string>context</string> </value>
                            </item>
                            <item>
                                <key> <string>name_m_self</string> </key>
                                <value> <string>script</string> </value>
                            </item>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_body</string> </key>
            <value> <string encoding="cdata"><![CDATA[

return """\n
<script>\n
"use strict";\n
(function ($) {\n
\n
  var methods;\n
\n
  methods = {\n
    click: function (method) {\n
      $(this).click(function() {\n
        $(this).parent().parent()\n
          .slapostoken(method);\n
        return false;\n
      });\n
    },\n
    generateComputerToken: function () {\n
      $.ajax("./Base_generateComputerTokenFromJS", {\n
        context: $(this),\n
        success: function(data) {\n
          $(this).attr("class", "alignr")\n
                 .text("New token: " + data.access_token);\n
        }\n
      })\n
    },\n
    generateCredentialToken: function () {\n
      $.ajax("./Base_generateCredentialTokenFromJS", {\n
        context: $(this),\n
        success: function(data) {\n
          $(this).attr("class", "alignr")\n
                 .text("New token: " + data.access_token);\n
        }\n
      })\n
    },\n
    generateRssRestrictedAccessToken: function () {\n
      $.ajax("./Base_generateRssRestrictedAccessTokenFromJS", {\n
        context: $(this),\n
        success: function(data) {\n
          $(this).html("<a target=\'_blank\' href=\'" + data.restricted_access_url +\n
              "\'>Your RSS Feed link</a>");\n
        }\n
      })\n
    },\n
  };\n
\n
  $.fn.slapostoken = function (method) {\n
    var result;\n
    if (methods.hasOwnProperty(method)) {\n
      result = methods[method].apply(\n
        this,\n
        Array.prototype.slice.call(arguments, 1)\n
      );\n
    } else {\n
      $.error(\'Method \' + method +\n
              \' does not exist on jQuery.slapostoken\');\n
    }\n
    return result;\n
  };\n
}(jQuery));\n
\n
$("#computertokengenerationlink")\n
  .slapostoken("click", "generateComputerToken");\n
$("#credentialtokengenerationlink")\n
  .slapostoken("click", "generateCredentialToken");\n
$("#rssaccesstokengenerationlink")\n
  .slapostoken("click", "generateRssRestrictedAccessToken");\n
</script>\n
"""\n


]]></string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Base_getTokenGeneratorJS</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
