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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amer
erp5
Commits
e0d94f9a
Commit
e0d94f9a
authored
Jul 04, 2017
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: Update default parameters for automatic redirection and default search engine
parent
b25768be
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
38 deletions
+35
-38
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_dispatcher_js.js
...age_module/gadget_officejs_page_bookmark_dispatcher_js.js
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_dispatcher_js.xml
...ge_module/gadget_officejs_page_bookmark_dispatcher_js.xml
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_html.html
...module/gadget_officejs_page_bookmark_preference_html.html
+10
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_html.xml
..._module/gadget_officejs_page_bookmark_preference_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_js.js
...age_module/gadget_officejs_page_bookmark_preference_js.js
+18
-27
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_js.xml
...ge_module/gadget_officejs_page_bookmark_preference_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_dispatcher_js.js
View file @
e0d94f9a
...
...
@@ -44,8 +44,8 @@
var
gadget
=
this
,
portal_type
=
null
,
option
=
{
auto_redirect
:
fals
e
,
search_engine
:
""
auto_redirect
:
tru
e
,
search_engine
:
"
https://duckduckgo.com/?q=
"
};
return
new
RSVP
.
Queue
()
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_dispatcher_js.xml
View file @
e0d94f9a
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1499162
399.03
</float>
<float>
1499162
533.71
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_html.html
View file @
e0d94f9a
...
...
@@ -14,6 +14,15 @@
</head>
<body>
<fieldset
class=
"ui-controlgroup ui-corner-all"
>
<div
class=
"center ui-controlgroup-controls"
>
<div
class=
"ui-field-contain"
>
<p>
To use the bookmark manager as a search engine, add this url to the search engine list of your browser :
</p>
<input
type=
"text"
class=
"search-engine-url"
style=
"font-weight:bold;"
readonly
></input>
</div>
</div>
</fieldset>
<form
class=
"options"
>
<fieldset
class=
"ui-controlgroup ui-corner-all"
>
<div
class=
"center ui-controlgroup-controls"
>
...
...
@@ -25,7 +34,7 @@
<div
class=
"ui-field-contain"
>
<label
for=
"search_engine"
>
Default Search Engine :
</label>
<div
class=
"ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"
>
<input
type=
"text"
name=
"search_engine"
value=
"https://duckduckgo.com/?q="
>
<input
type=
"text"
name=
"search_engine"
>
</div>
</div>
...
...
@@ -35,8 +44,5 @@
</fieldset>
</form>
<hr
/>
<p>
To use the bookmark manager as a search engine, add this url to the search engine list of your browser :
<span
class=
"search-engine-url"
style=
"font-weight:bold;"
></span></p>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_html.xml
View file @
e0d94f9a
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
56.64450.52709.9386
</string>
</value>
<value>
<string>
9
60.32715.46116.17902
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
14
85780641.43
</float>
<float>
14
99161500.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_js.js
View file @
e0d94f9a
...
...
@@ -2,7 +2,7 @@
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
function
saveOptionDict
(
gadget
)
{
var
option_dict
=
{
search_engine
:
gadget
.
props
.
element
.
querySelector
(
"
.options input[name=
\"
search_engine
\"
]
"
).
value
,
...
...
@@ -11,20 +11,6 @@
return
gadget
.
setSetting
(
"
option
"
,
option_dict
);
}
function
setSearchUrl
(
gadget
)
{
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
option
"
);
})
.
push
(
function
(
option
)
{
return
gadget
.
getUrlFor
({
page
:
'
bookmark_dispatcher
'
});
})
.
push
(
function
(
url
)
{
url
=
window
.
location
.
origin
+
window
.
location
.
pathname
+
url
+
'
&search=%s
'
;
gadget
.
props
.
element
.
getElementsByClassName
(
"
search-engine-url
"
)[
0
].
innerHTML
=
url
;
});
}
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
...
...
@@ -55,20 +41,25 @@
return
RSVP
.
Queue
()
// Set the URL used to set the Bookmark Manager as a search engine.
.
push
(
function
()
{
return
setSearchUrl
(
gadget
);
return
gadget
.
getUrlFor
({
page
:
'
bookmark_dispatcher
'
}
);
})
// Set elements in form to reflect option dict
.
push
(
function
()
{
return
gadget
.
getSetting
(
"
option
"
)
.
push
(
function
(
option_dict
)
{
if
(
option_dict
)
{
gadget
.
props
.
element
.
querySelector
(
"
.options input[name=
\"
search_engine
\"
]
"
).
value
=
option_dict
.
search_engine
;
gadget
.
props
.
element
.
querySelector
(
"
.options input[name=
\"
auto_redirect
\"
]
"
).
checked
=
option_dict
.
auto_redirect
;
}
});
.
push
(
function
(
url
)
{
url
=
window
.
location
.
origin
+
window
.
location
.
pathname
+
url
+
'
&search=%s
'
;
gadget
.
props
.
element
.
getElementsByClassName
(
"
search-engine-url
"
)[
0
].
value
=
url
;
return
gadget
.
getSetting
(
"
option
"
);
})
// Adds a save button
.
push
(
gadget
.
updateHeader
({
title
:
'
Bookmark Manager Preferences
'
,
save_action
:
true
}));
.
push
(
function
(
option_dict
)
{
if
(
option_dict
===
undefined
)
{
option_dict
=
{
search_engine
:
"
https://duckduckgo.com/?q=
"
,
auto_redirect
:
true
};
}
gadget
.
props
.
element
.
querySelector
(
"
.options input[name=
\"
search_engine
\"
]
"
).
value
=
option_dict
.
search_engine
;
gadget
.
props
.
element
.
querySelector
(
"
.options input[name=
\"
auto_redirect
\"
]
"
).
checked
=
option_dict
.
auto_redirect
;
return
gadget
.
updateHeader
({
title
:
'
Bookmark Manager Preferences
'
,
save_action
:
true
});
});
})
.
onEvent
(
"
submit
"
,
function
()
{
saveOptionDict
(
this
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_preference_js.xml
View file @
e0d94f9a
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
56.64450.52709.9386
</string>
</value>
<value>
<string>
9
60.32743.2629.17442
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
14
85780623.37
</float>
<float>
14
99161566.28
</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