Commit 373858b2 authored by Papa Tamsir Kane's avatar Papa Tamsir Kane

erp5_officejs: Bookmark Manager: fix migration code

* Migrate all documents instead of just the first one
* Modify dropbox configurator to use query setting if available
parent e17b6482
......@@ -15,6 +15,7 @@
</head>
<body>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Url</script>
<script data-renderjs-configuration="query" type="text/x-renderjs-configuration">portal_type: "Url" OR portal_type: "Bookmark"</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">url_module</script>
<script data-renderjs-configuration="document_title" type="text/x-renderjs-configuration">Bookmark</script>
<script data-renderjs-configuration="document_title_plural" type="text/x-renderjs-configuration">Bookmarks</script>
......
......@@ -275,7 +275,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.49448.1356.36437</string> </value>
<value> <string>962.6954.11325.44800</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -293,7 +293,7 @@
</tuple>
<state>
<tuple>
<float>1504096072.75</float>
<float>1505480827.65</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -41,10 +41,10 @@
promises_list.push(gadget.jio_put(query_result.data.rows[i].id, row_value));
}
}
data = query_result;
}
promises_list.push(gadget.setSetting('migrated', true));
data = query_result;
return RSVP.all(promises_list);
}
} else {
data = query_result;
}
......@@ -96,8 +96,7 @@
"key": "field_listbox",
"lines": 30,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs?query=portal_type%3A%22" +
result[1] + "%22",
"query": 'portal_type: "Url" OR portal_type: "Bookmark"',
"portal_type": [],
"search_column_list": column_list,
"sort_column_list": column_list,
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.5348.11380.64921</string> </value>
<value> <string>962.6982.53259.45892</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1505382104.85</float>
<float>1505481207.55</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -8,16 +8,20 @@
.push(function () {
return RSVP.all([
gadget.getSetting("portal_type"),
gadget.getSetting("erp5_attachment_synchro", "")
gadget.getSetting("erp5_attachment_synchro", ""),
gadget.getSetting("query", null)
]);
})
.push(function (setting) {
if (setting[2] === null) {
setting[2] = setting[0];
}
var configuration = {},
attachment_synchro = setting[1] !== "";
configuration = {
type: "replicate",
query: {
query: 'portal_type:"' + setting[0] + '" ',
query: setting[2],
limit: [0, 100],
sort_on: [["modification_date", "descending"]]
},
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.26184.18077.10393</string> </value>
<value> <string>962.6956.19499.59221</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1502716653.05</float>
<float>1505479600.23</float>
<string>UTC</string>
</tuple>
</state>
......
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