Commit ede62a0a authored by Alain Takoudjou's avatar Alain Takoudjou

erp5_web_mynij_search: torrent is seed run in background and activities page can show seed status.

Seed torrent in background
Add import index from torrent in source page
Activities page show seeder status
parent 37113411
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_js_script</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_js_script</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>mynij_index_import</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Add portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Import from Torrent</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/MynijSearchCollection_importIndex</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/MynijSearchCollectionModule_viewForMynijSearch</string> </value>
<value> <string>string:${object_url}/MynijSearchCollectionModule_view</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -42,8 +42,8 @@
<script id="panel-template-body-list" type="text/x-handlebars-template">
<li class="ui-first-child"><a href="{{mynij_search_href}}" class="ui-btn ui-btn-icon-left ui-icon-search" data-i18n="Search">Search</a></li>
<li><a href="{{source_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-sitemap" data-i18n="Sitemap Sources" accesskey="s">Sitemap Sources</a></li>
<li><a href="{{mynij_torrent_href}}" class="ui-btn ui-btn-icon-left ui-icon-magnet" data-i18n="Webtorrent Index" accesskey="w">Webtorrent Index</a></li>
<li><a href="{{source_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-sitemap" data-i18n="Sources" accesskey="s">Sources</a></li>
<li><a href="{{activity_href}}" class="ui-btn ui-btn-icon-left ui-icon-magnet" data-i18n="Activities" accesskey="a">Activities</a></li>
<li><a href="{{sync_href}}" class="ui-btn ui-btn-icon-left ui-icon-refresh" data-i18n="Synchronize">Synchronize</a></li>
<li><a href="{{storage_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Storages">Storages</a></li>
<li class="ui-last-child"><a href="https://www.erp5.com/mynij-HowTo.Install.And.Use.For.Search" target="_blank" class="ui-btn ui-btn-icon-left ui-icon-question" data-i18n="help">Help</a></li>
......@@ -74,6 +74,8 @@
data-gadget-scope="parser" data-gadget-sandbox="public"></div>
<div id = "gadget_model" data-gadget-url="gadget_mynij_model.html"
data-gadget-scope="model" data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_erp5_mynij_webtorrent.html"
data-gadget-scope="webtorrent" data-gadget-sandbox="public"></div>
<div class="jqm-navmenu-panel"></div>
</body>
</html>
\ No newline at end of file
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.20060.54644.38075</string> </value>
<value> <string>988.45388.37664.34218</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1606688380.84</float>
<float>1608199838.39</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -100,6 +100,10 @@
})
.push(function (result) {
gadget.props.model_gadget = result;
return gadget.getDeclaredGadget("webtorrent");
})
.push(function (result) {
gadget.props.webtorrent_gadget = result;
});
})
.allowPublicAcquisition("add_to_index", function (args) {
......@@ -112,6 +116,9 @@
.allowPublicAcquisition('getParentElement', function () {
return this.element.querySelector(".ui-content");
})
.declareService(function () {
return this.props.webtorrent_gadget.seedAll();
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
......@@ -216,7 +223,7 @@
context.getUrlFor({command: 'display', options: {page: "ojs_configurator"}}),
context.getUrlFor({command: 'display', options: {page: "ojs_sync", 'auto_repair': true}}),
context.getUrlFor({command: 'display', options: {page: "ojs_local_controller"}}),
context.getUrlFor({command: 'display', options: {page: "mynij_torrent"}})
context.getUrlFor({command: 'display', options: {page: "mynij_activities"}})
]);
})
.push(function (result_list) {
......@@ -226,7 +233,7 @@
"storage_href": result_list[1],
"sync_href": result_list[2],
"source_list_href": result_list[3],
"mynij_torrent_href": result_list[4]
"activity_href": result_list[4]
})
);
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.31543.42603.60603</string> </value>
<value> <string>988.46729.51863.18141</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1606388302.38</float>
<float>1608300703.11</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -14,12 +14,12 @@
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="webtorrent.min.js" type="text/javascript"></script>
<script src="gadget_erp5_mynij_webtorrent.js" type="text/javascript"></script>
<script id="torrent-info-template" type="text/x-handlebars-template">
<div class="torrentBoddy" id="{{infohash}}">
<div class="torrentBoddy {{#if is_seed}}is-seed{{/if}}" id="{{infohash}}">
<div class="hero">
<div class="output">
<div class="progressBar"></div>
......@@ -34,12 +34,12 @@
<span class="show-leech"> from </span>
<span class="show-seed"> to </span>
<code class="numPeers">0 peers</code>.
{{#if magnet_uri}}
<span>
<a href="{{magnet_uri}}" class="ui-btn ui-btn-icon-left ui-icon-magnet"> Magnet URI </a>
</span>
{{/if}}
</div>
{{#if magnet_uri}}
<div>
<a href="{{magnet_uri}}">Torrent Magnet URI</a>
</div>
{{/if}}
<div>
<code class="downloaded"></code>
of <code class="total"></code>
......@@ -58,12 +58,6 @@
<h2 class="info">Checking available peers for download...</h2>
</div>
<br/>
<h1 class="head-title">Shared Index Torrent</h1>
<div><i class="notification-msg">Do not close this page to keep seeding the torrent</i></div>
<div class="torrent-seed">
<h2 class="info">Checking for indexes to seed...</h2>
</div>
<div data-gadget-url="gadget_mynij_model.html" data-gadget-scope="model"
data-gadget-sandbox="public"></div>
</body>
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.20945.22767.42222</string> </value>
<value> <string>988.48319.53521.12885</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1606739614.81</float>
<float>1608296295.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.20944.27367.14472</string> </value>
<value> <string>988.48399.36109.57497</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1606739558.23</float>
<float>1608301491.76</float>
<string>UTC</string>
</tuple>
</state>
......
<!doctype html>
<html>
<head>
<title>Mynij Search</title>
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="gadget_erp5_page_mynij_activities.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="mynij-style.css">
</head>
<body>
<div class="seedbox" id="seedactivities">
<h1 class="head-title">Torrent Background Activities</h1>
<div class="torrent-seed">
<h2 class="info">Please wait while checking seeds...</h2>
</div>
</div>
</body>
</html>
\ No newline at end of file
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80*/
/*global window, RSVP, rJS, document*/
(function (window, document, rJS, RSVP) {
var gadget;
rJS(window)
.setState({
torrent_gadget : null
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
/*.ready(function () {
var gadget = this;
return this.getDeclaredGadget("torrent")
.push(function (torrent) {
return gadget.changeState({
torrent_gadget: torrent
});
});
})*/
.onStateChange(function () {
})
.declareMethod("render", function (options) {
var gadget = this;
return new RSVP.Queue()
.push(function (url_list) {
return gadget.updateHeader({
page_title: "Mynij Activities"
//selection_url: url_list[0]
});
});
})
.declareMethod("render", function (options) {
var gadget = this;
return;
});
}(window, document, rJS, RSVP));
\ No newline at end of file
......@@ -14,7 +14,6 @@
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getSetting", "getSetting")
.ready(function () {
var model_gadget,
result_gadget,
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.50625.31910.7697</string> </value>
<value> <string>988.5449.4324.54169</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1604588336.04</float>
<float>1605886140.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,16 +8,9 @@
<link rel="stylesheet" type="text/css" href="mynij-style.css">
</head>
<body>
<h1 class="head-title">Add new Index from shared torrent</h1>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
<h1 class="head-title">Importing index from torrent</h1>
<div><i class="notification-msg">Do not close this page to keep downloading the torrent</i></div>
<div data-gadget-url="gadget_erp5_mynij_webtorrent.html" data-gadget-scope="torrent"
data-gadget-sandbox="public"></div>
</body>
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.20946.33385.40055</string> </value>
<value> <string>988.42957.6914.45602</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1606739714.2</float>
<float>1608225925.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -36,82 +36,24 @@
})
.push(function (url_list) {
return gadget.updateHeader({
page_title: "Mynij Search"
page_title: "Torrent index import"
//selection_url: url_list[0]
});
});
})
.onEvent('submit', function () {
var gadget = this,
doc;
return new RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (form_doc) {
doc = form_doc;
return gadget.state.torrent_gadget.download(form_doc.magnet_uri);
})
.push(function (state) {
return;
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.declareMethod("render", function (options) {
var gadget = this;
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
gadget.getSetting('portal_type')
]);
})
.push(function (result) {
return result[0].render({
erp5_document: {
"_embedded": {"_view": {
"my_magnet_uri": {
"description": "",
"title": "Magnet URI",
"default": "",
"css_class": "",
"required": 1,
"editable": 1,
"key": "magnet_uri",
"hidden": 0,
"type": "TextAreaField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_magnet_uri"]]
]]
}
});
})
.push(function (chg_pwd_url) {
return gadget.updateHeader({
page_title: "Torrent Indexes",
save_action: true
});
});
});
.declareMethod("render", function (options) {
var gadget = this;
return RSVP.Queue()
.push(function () {
if (options.magnet_uri) {
var redirect = "mynij_search";
//automatically download the magnet
return gadget.state.torrent_gadget.download(
options.magnet_uri,
redirect);
}
});
});
}(window, document, rJS, RSVP));
\ No newline at end of file
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.16982.46115.32682</string> </value>
<value> <string>988.43042.44874.16674</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1606502107.22</float>
<float>1608199334.01</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -96,12 +96,14 @@ CACHE:\n
\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9uIE1vZHVsZQ==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9uIE1vZHVsZS9teW5pal9zZWFyY2hfdmlldw==\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovTXluaWpTZWFyY2hDb2xsZWN0aW9uTW9kdWxlX3ZpZXdGb3JNeW5palNlYXJjaA==\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovTXluaWpTZWFyY2hDb2xsZWN0aW9uTW9kdWxlX3ZpZXc=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9u\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9uL215bmlqX3NlYXJjaF92aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovTXluaWpTZWFyY2hDb2xsZWN0aW9uX3ZpZXdGb3JNeW5palNlYXJjaA==\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovTXluaWpTZWFyY2hDb2xsZWN0aW9uX3ZpZXc=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9uL215bmlqX3NlYXJjaF9idWlsZF9pbmRleA==\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovQmFzZV9idWlsZEluZGV4TXluaWpTZWFyY2g=\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfbXluaWovTXluaWpTZWFyY2hDb2xsZWN0aW9uX2ltcG9ydEluZGV4\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL015bmlqIFNlYXJjaCBDb2xsZWN0aW9uIE1vZHVsZS9teW5pal9pbmRleF9pbXBvcnQ\n
\n
NETWORK:\n
*</string> </value>
......@@ -237,7 +239,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>985.53317.48928.26214</string> </value>
<value> <string>988.48448.28585.15018</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +257,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1597156315.96</float>
<float>1608303775.09</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,7 +15,7 @@
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">mynij_search_collection_module</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Mynij Search Collection</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_mynij</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Mynij Search Collection Module | mynij_search_view', 'Mynij Search Collection | mynij_search_view', 'Mynij Search Collection | mynij_search_build_index')</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Mynij Search Collection Module | mynij_search_view', 'Mynij Search Collection Module | mynij_index_import', 'Mynij Search Collection | mynij_search_view', 'Mynij Search Collection | mynij_search_build_index')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Mynij Search Collection Module | Mynij Search Collection',)</script>
<script data-renderjs-configuration="mynij_search_collection_module_dict" type="text/x-renderjs-configuration">{"title": "Mynij Search", "filter_action": 1, "hide_add_button": 0, "history_previous_link": 1}</script>
<script data-renderjs-configuration="mynij_search_collection_dict" type="text/x-renderjs-configuration">{"title": "Mynij Search", "editable": 1, "history_previous_link": 1}</script>
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.3598.53432.43161</string> </value>
<value> <string>988.42540.39532.44953</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1597920922.47</float>
<float>1607948996.39</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -30,7 +30,7 @@
transition: .5s .5s background-color ease-in-out;
}
.hero {
background-color: #2a3749;
background-color: #034163;
}
.status {
color: #fff;
......@@ -38,7 +38,7 @@
padding: 5px;
}
.torrentBoddy a:link, .torrentBoddy a:visited {
color: #30a247;
color: #b7cae2;
text-decoration: none;
}
......@@ -49,6 +49,7 @@
.head-title {
font-size: 2em;
margin-bottom: 15px;
}
.hidden {
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.20818.7433.31658</string> </value>
<value> <string>988.48207.9318.17339</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1606732099.72</float>
<float>1608303150.22</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -91,7 +91,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>MynijSearchCollectionModule_viewForMynijSearch</string> </value>
<value> <string>MynijSearchCollectionModule_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
......@@ -76,11 +76,9 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_links</string>
<string>my_seed</string>
<string>gadget_field_action_js_script</string>
<string>action_description</string>
<string>your_magnet_uri</string>
<string>your_info_hash</string>
</list>
</value>
</item>
......@@ -95,7 +93,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>MynijSearchCollection_viewForMynijSearch</string> </value>
<value> <string>MynijSearchCollection_importIndex</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -103,7 +101,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>MynijSearchCollection_view</string> </value>
<value> <string>MynijSearchCollection_importIndex</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -123,7 +121,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Mynij Search Collection</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="LabelField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>action_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Confirm import</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_links</string> </value>
<value> <string>your_magnet_uri</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -257,7 +257,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Links</string> </value>
<value> <string>Magnet Uri</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......
......@@ -9,6 +9,8 @@ url_list = [
"gadget_erp5_mynij_webtorrent.js",
"gadget_erp5_page_mynij_torrent.html",
"gadget_erp5_page_mynij_torrent.js",
"gadget_erp5_page_mynij_activities.html",
"gadget_erp5_page_mynij_activities.js",
"gadget_mynij_model.html",
"gadget_mynij_model.js",
"gadget_mynij_parser.html",
......@@ -22,6 +24,8 @@ url_list = [
"mynij_google_logo.png",
"action_mynij_search_build_index.html",
"action_mynij_search_build_index.js",
"action_mynij_search_import_index.html",
"action_mynij_search_import_index.js",
"flexsearch.js",
"flexsearch_en.js",
"mynij_rss-parser.min.js",
......
<!doctype html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="action_mynij_search_import_index.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_mynij_webtorrent.html" data-gadget-scope="torrent"
data-gadget-sandbox="public"></div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>action_mynij_search_import_index.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>action_mynij_search_import_index.html</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_post", "jio_post")
.ready(function () {
var gadget = this;
return this.getDeclaredGadget("torrent")
.push(function (torrent) {
return gadget.changeState({
torrent_gadget: torrent
});
});
})
.declareMethod("preRenderDocument", function (parent_options) {
var gadget = this;
/*return gadget.jio_get(parent_options.jio_key)
.push(function (parent_document) {
return parent_document;
});*/
})
.declareMethod("handleSubmit", function (content_dict, parent_options) {
var return_submit_dict,
gadget = this;
if (!content_dict.magnet_uri) {
return;
}
return new RSVP.Queue()
.push(function(){
return_submit_dict = {
notify: {
message: "Download index",
status: "success"
},
redirect: {
command: "change",
options: {page : "mynij_torrent",
magnet_uri: content_dict.magnet_uri
}
}
};
return return_submit_dict;
});
});
}(window, rJS, RSVP));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>action_mynij_search_import_index.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>action_mynij_search_import_index.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Mynij Search Collection Module | mynij_index_import
Mynij Search Collection Module | mynij_search_view
Mynij Search Collection Module | view
Mynij Search Collection | jio_view
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment