Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vivek
erp5
Commits
155c33aa
Commit
155c33aa
authored
Nov 05, 2015
by
Vivek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: modified router logic.
parent
ef31cd51
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
151 additions
and
55 deletions
+151
-55
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
.../web_page_module/gadget_officejs_jio_web_page_view_js.xml
+4
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml
...age_module/gadget_officejs_page_jio_configurator_html.xml
+5
-5
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml
...module/gadget_officejs_page_jio_dav_configurator_html.xml
+5
-5
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml
...e_module/gadget_officejs_page_jio_dav_configurator_js.xml
+4
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
...emplateItem/web_page_module/gadget_officejs_router_js.xml
+109
-17
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml
...e_module/gadget_officejs_text_editor_application_html.xml
+6
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml
...le/gadget_officejs_text_editor_application_panel_html.xml
+7
-7
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml
...dule/gadget_officejs_text_editor_application_panel_js.xml
+7
-3
bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml
...PathTemplateItem/web_site_module/officejs_text_editor.xml
+4
-4
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
View file @
155c33aa
...
...
@@ -208,7 +208,7 @@
gadget.props.element.innerHTML = html;\n
return gadget.updateHeader({\n
title: options.doc.title + " | Web Page",\n
back_url: "#page=text_editor_list",\n
back_url: "#
?
page=text_editor_list",\n
panel_action: false,\n
save_action: true\n
});\n
...
...
@@ -397,7 +397,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -411,7 +411,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.
18929.62498.39526
</string>
</value>
<value>
<string>
946.
54860.11845.29678
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -429,7 +429,7 @@
</tuple>
<state>
<tuple>
<float>
144
4320970.58
</float>
<float>
144
6729331.89
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml
View file @
155c33aa
...
...
@@ -164,10 +164,10 @@
<div
class=
"ui-controlgroup ui-controlgroup-horizontal"
>
\n
<div
class=
"ui-grid-a ui-responsive"
>
\n
<div
class=
"ui-block-a"
>
\n
<a
class=
"ui-btn"
href=
"#page=sync"
data-i18n=
"Synchronize"
>
Synchronize
</a>
\n
<a
class=
"ui-btn"
href=
"#
?
page=sync"
data-i18n=
"Synchronize"
>
Synchronize
</a>
\n
</div>
\n
<div
class=
"ui-block-b"
>
\n
<a
class=
"ui-btn"
href=
"#page=document_list"
data-i18n=
"Go to document List"
>
Go to document List
</a>
\n
<a
class=
"ui-btn"
href=
"#
?
page=document_list"
data-i18n=
"Go to document List"
>
Go to document List
</a>
\n
</div>
\n
</div>
\n
</div>
\n
...
...
@@ -297,7 +297,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -311,7 +311,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.61353.27590.61969
</string>
</value>
<value>
<string>
94
6.4378.53544.28347
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -329,7 +329,7 @@
</tuple>
<state>
<tuple>
<float>
144
3018896.6
</float>
<float>
144
6729498.99
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml
View file @
155c33aa
...
...
@@ -170,10 +170,10 @@
<div
class=
"ui-controlgroup ui-controlgroup-horizontal"
>
\n
<div
class=
"ui-grid-a ui-responsive"
>
\n
<div
class=
"ui-block-a"
>
\n
<a
class=
"ui-btn"
href=
"#page=sync"
>
Synchronize
</a>
\n
<a
class=
"ui-btn"
href=
"#
?
page=sync"
>
Synchronize
</a>
\n
</div>
\n
<div
class=
"ui-block-b"
>
\n
<a
class=
"ui-btn"
href=
"#page=document_list"
>
Go to document List
</a>
\n
<a
class=
"ui-btn"
href=
"#
?
page=document_list"
>
Go to document List
</a>
\n
</div>
\n
</div>
\n
</div>
\n
...
...
@@ -306,7 +306,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -320,7 +320,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.58544.33560.24866
</string>
</value>
<value>
<string>
94
6.4378.53544.28347
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -338,7 +338,7 @@
</tuple>
<state>
<tuple>
<float>
144
3010638.45
</float>
<float>
144
6729536.73
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml
View file @
155c33aa
...
...
@@ -188,7 +188,7 @@
var gadget = this;\n
return gadget.updateHeader({\n
title: "Connect To DAV Storage",\n
back_url: "#page=jio_configurator",\n
back_url: "#
?
page=jio_configurator",\n
panel_action: false\n
}).push(function () {\n
return gadget.props.deferred.resolve();\n
...
...
@@ -341,7 +341,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -355,7 +355,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.61336.46618.42325
</string>
</value>
<value>
<string>
94
6.54860.11845.29678
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -373,7 +373,7 @@
</tuple>
<state>
<tuple>
<float>
144
4319088.33
</float>
<float>
144
6729573.71
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
View file @
155c33aa
...
...
@@ -108,35 +108,111 @@
\n
var gadget_klass = rJS(window),\n
MAIN_PAGE_PREFIX = "gadget_officejs_",\n
DEFAULT_PAGE = "text_editor_list";\n
DEFAULT_PAGE = "text_editor_list",\n
REDIRECT_TIMEOUT = 5000;\n
\n
function listenHashChange(gadget) {\n
// Handle hash in this format: #$path1/path2?a=b&c=d\n
function extractHashAndDispatch(evt) {\n
var hash = (evt.newURL || window.location.toString()).split(\'#\')[1],\n
split,\n
command = "",\n
query = "",\n
subhashes,\n
subhash,\n
keyvalue,\n
index,\n
args = {};\n
if (hash !== undefined) {\n
split = hash.split(\'?\');\n
command = split[0] || "";\n
query = split[1] || "";\n
}\n
subhashes = query.split(\'&\');\n
for (index in subhashes) {\n
if (subhashes.hasOwnProperty(index)) {\n
subhash = subhashes[index];\n
if (subhash !== \'\') {\n
keyvalue = subhash.split(\'=\');\n
if (keyvalue.length === 2) {\n
args[decodeURIComponent(keyvalue[0])] = decodeURIComponent(keyvalue[1]);\n
}\n
}\n
}\n
}\n
\n
return gadget.renderApplication({\n
method: command[0],\n
path: command.substr(1),\n
args: args\n
});\n
\n
}\n
\n
var result = loopEventListener(window, \'hashchange\', false,\n
extractHashAndDispatch),\n
event = document.createEvent("Event");\n
event.initEvent(\'hashchange\', true, true);\n
event.newURL = window.location.toString();\n
window.dispatchEvent(event);\n
return result;\n
}\n
\n
gadget_klass\n
.declareAcquiredMethod(\'pleaseRedirectMyHash\', \'pleaseRedirectMyHash\')\n
.declareAcquiredMethod(\'jio_get\', \'jio_get\')\n
\n
.ready(function (gadget) {\n
gadget.props = {};\n
gadget.props = {\n
start_deferred: RSVP.defer()\n
};\n
})\n
\n
.declareMethod("getCommandUrlFor", function(options) {\n
var prefix = \'?\',\n
result,\n
key;\n
result = "#";\n
for (key in options) {\n
if (options.hasOwnProperty(key) && options[key] !== undefined) {\n
// Don\'t keep empty values\n
result += prefix + encodeURIComponent(key) + "=" + encodeURIComponent(options[key]);\n
prefix = \'&\';\n
}\n
}\n
return result;\n
})\n
\n
.declareMethod(\'redirect\', function (options) {\n
return this.getCommandUrlFor(options)\n
.push(function (hash) {\n
window.location.replace(hash);\n
// prevent returning unexpected response\n
// wait for the hash change to occur\n
// fail if nothing happens\n
return RSVP.timeout(REDIRECT_TIMEOUT);\n
});\n
})\n
\n
.declareMethod(\'route\', function (options) {\n
var gadget = this;\n
var gadget = this,\n
args = options.args;\n
gadget.options = options;\n
if (
options.jio_key === undefined || option
s.jio_key === \'\') {\n
if (
options.page === undefined || options.page === \'\' || option
s.page === "document_list") {\n
option
s.page = DEFAULT_PAGE;\n
if (
args.jio_key === undefined || arg
s.jio_key === \'\') {\n
if (
args.page === undefined || args.page === \'\' || arg
s.page === "document_list") {\n
arg
s.page = DEFAULT_PAGE;\n
}\n
return {\n
url: MAIN_PAGE_PREFIX + "page_" +
option
s.page + ".html",\n
options:
option
s\n
url: MAIN_PAGE_PREFIX + "page_" +
arg
s.page + ".html",\n
options:
arg
s\n
};\n
}\n
return gadget.jio_get(
option
s.jio_key)\n
return gadget.jio_get(
arg
s.jio_key)\n
.push(function (doc) {\n
var sub_options = {},\n
base_portal_type = doc.portal_type.toLowerCase().replace(/\\s/g, "_");\n
sub_options = {\n
doc: doc,\n
jio_key:
option
s.jio_key,\n
search:
option
s.search\n
jio_key:
arg
s.jio_key,\n
search:
arg
s.search\n
};\n
if (base_portal_type.search(/_temp$/) >
= 0) {\n
//Remove "_temp"\n
...
...
@@ -148,10 +224,26 @@
return {\n
url: MAIN_PAGE_PREFIX + "jio_"\n
+ base_portal_type\n
+ "_" +
option
s.page + ".html",\n
+ "_" +
arg
s.page + ".html",\n
options: sub_options\n
};\n
});\n
})\n
\n
.declareAcquiredMethod(\'jio_get\', \'jio_get\')\n
.declareAcquiredMethod(\'renderApplication\', \'renderApplication\')\n
.declareMethod(\'start\', function () {\n
this.props.start_deferred.resolve();\n
})\n
.declareService(function () {\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.props.start_deferred.promise;\n
})\n
.push(function () {\n
return listenHashChange(gadget);\n
});\n
});\n
\n
}(window, rJS));
...
...
@@ -277,7 +369,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -291,7 +383,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.54379.5447.4341
7
</string>
</value>
<value>
<string>
94
6.4378.53544.2834
7
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -309,7 +401,7 @@
</tuple>
<state>
<tuple>
<float>
144
2858756.66
</float>
<float>
144
6729681.9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml
View file @
155c33aa
...
...
@@ -182,9 +182,9 @@
<script
class=
"panel-template"
type=
"text/x-handlebars-template"
>
\n
<div
class=
"ui-content"
>
\n
<ul
data-role=
"listview"
class=
"ui-listview"
>
\n
<li><a
href=
"#page=text_editor_list"
data-i18n=
"Text Documents"
>
Text Documents
</a></li>
\n
<li><a
href=
"#page=sync"
data-i18n=
"Sync"
>
Sync
</a></li>
\n
<li
class=
"ui-last-child"
><a
href=
"#page=logout"
data-i18n=
"Logout"
>
Logout
</a></li>
\n
<li><a
href=
"#
?
page=text_editor_list"
data-i18n=
"Text Documents"
>
Text Documents
</a></li>
\n
<li><a
href=
"#
?
page=sync"
data-i18n=
"Sync"
>
Sync
</a></li>
\n
<li
class=
"ui-last-child"
><a
href=
"#
?
page=logout"
data-i18n=
"Logout"
>
Logout
</a></li>
\n
</ul>
\n
</div>
\n
</script>
\n
...
...
@@ -334,7 +334,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -348,7 +348,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.18361.2224.61866
</string>
</value>
<value>
<string>
94
6.4378.53544.28347
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -366,7 +366,7 @@
</tuple>
<state>
<tuple>
<float>
144
0439282.96
</float>
<float>
144
6729798.11
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml
View file @
155c33aa
...
...
@@ -140,10 +140,10 @@
<script
id=
"panel-template-body"
type=
"text/x-handlebars-template"
>
\n
<div
class=
"ui-content"
>
\n
<ul
data-role=
"listview"
class=
"ui-listview"
>
\n
<li><a
href=
"#page=text_editor_list"
data-i18n=
"Text Documents"
>
Text Documents
</a></li>
\n
<li><a
href=
"#page=jio_configurator"
data-i18n=
"Storage Configuration"
>
Storage Configuration
</a></li>
\n
<li><a
href=
"#page=sync"
data-i18n=
"Syncronization"
>
Syncronization
</a></li>
\n
<li
class=
"ui-last-child"
><a
href=
"#page=logout"
data-i18n=
"Logout"
>
Logout
</a></li>
\n
<li><a
href=
"#
?
page=text_editor_list"
data-i18n=
"Text Documents"
>
Text Documents
</a></li>
\n
<li><a
href=
"#
?
page=jio_configurator"
data-i18n=
"Storage Configuration"
>
Storage Configuration
</a></li>
\n
<li><a
href=
"#
?
page=sync"
data-i18n=
"Syncronization"
>
Syncronization
</a></li>
\n
<li
class=
"ui-last-child"
><a
href=
"#
?
page=logout"
data-i18n=
"Logout"
>
Logout
</a></li>
\n
</ul>
\n
</div>
\n
</script>
\n
...
...
@@ -278,7 +278,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -292,7 +292,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.61348.56996.63675
</string>
</value>
<value>
<string>
94
6.54860.11845.29678
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -310,7 +310,7 @@
</tuple>
<state>
<tuple>
<float>
144
4319473.
8
</float>
<float>
144
6729867.4
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml
View file @
155c33aa
...
...
@@ -156,6 +156,10 @@
.declareMethod(\'toggle\', function () {\n
this.props.jelement.panel("toggle");\n
})\n
\n
.declareMethod(\'close\', function () {\n
this.props.jelement.panel("close");\n
})\n
\n
.declareMethod(\'render\', function () {\n
return;\n
...
...
@@ -320,7 +324,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -334,7 +338,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.38557.26146.25275
</string>
</value>
<value>
<string>
94
6.4378.53544.28347
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -352,7 +356,7 @@
</tuple>
<state>
<tuple>
<float>
144
1651247.96
</float>
<float>
144
6730020.92
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml
View file @
155c33aa
...
...
@@ -430,7 +430,7 @@
</item>
<item>
<key>
<string>
configuration_translation_gadget_url
</string>
</key>
<value>
<string>
gadget_
officejs_
translation.html
</string>
</value>
<value>
<string>
gadget_translation.html
</string>
</value>
</item>
<item>
<key>
<string>
configuration_view_action_category
</string>
</key>
...
...
@@ -707,7 +707,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -721,7 +721,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.58604.38981.59955
</string>
</value>
<value>
<string>
94
6.4378.53544.28347
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -739,7 +739,7 @@
</tuple>
<state>
<tuple>
<float>
144
2858486.32
</float>
<float>
144
6730078.39
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment