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
Binh
erp5
Commits
3bd5a1cc
Commit
3bd5a1cc
authored
Dec 20, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Display portal_status_message notification
parent
ef1100d9
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
846 additions
and
41 deletions
+846
-41
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
+5
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
...teItem/web_page_module/rjs_gadget_erp5_launcher_html.html
+4
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
...ateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+27
-20
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
+27
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_html.html
...em/web_page_module/rjs_gadget_erp5_notification_html.html
+19
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_html.xml
...tem/web_page_module/rjs_gadget_erp5_notification_html.xml
+324
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_js.js
...teItem/web_page_module/rjs_gadget_erp5_notification_js.js
+56
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_js.xml
...eItem/web_page_module/rjs_gadget_erp5_notification_js.xml
+320
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+7
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+8
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
+7
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_site_module/renderjs_runner.xml
...s_ui/PathTemplateItem/web_site_module/renderjs_runner.xml
+2
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
...teItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
+28
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
View file @
3bd5a1cc
...
...
@@ -108,7 +108,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
CACHE MANIFEST\n
# generated on Thu,
01 Dec 2016 15:00:00 GMT
\n
# generated on Thu,
20 Dec 2016 15:00:00 GMT XXX
\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
...
...
@@ -171,6 +171,8 @@ gadget_erp5_jio.html\n
gadget_erp5_jio.js\n
gadget_erp5_label_field.html\n
gadget_erp5_label_field.js\n
gadget_erp5_notification.html\n
gadget_erp5_notification.js\n
gadget_erp5_page_action.html\n
gadget_erp5_page_action.js\n
gadget_erp5_page_form.html\n
...
...
@@ -366,7 +368,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.43982.28112.56149
</string>
</value>
<value>
<string>
95
6.4318.43275.52838
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -384,7 +386,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
148
0609455.33
</float>
<float>
148
2249891.22
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
View file @
3bd5a1cc
...
...
@@ -36,6 +36,10 @@
data-gadget-scope=
"router"
data-gadget-sandbox=
"public"
></div>
<div
data-gadget-url=
"gadget_erp5_notification.html"
data-gadget-scope=
"notification"
data-gadget-sandbox=
"public"
></div>
<div
data-gadget-url=
"${translation_gadget}"
data-gadget-scope=
"translation_gadget"
data-gadget-sandbox=
"public"
></div>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
View file @
3bd5a1cc
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.5916.8255.62617
</string>
</value>
<value>
<string>
95
5.55192.19343.33109
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
14
75848425.64
</float>
<float>
14
82240206.37
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
3bd5a1cc
...
...
@@ -42,14 +42,14 @@
};
}
function
route
(
my_root_gadget
,
my_scope
,
my_method
,
my_param
_list
)
{
function
route
(
my_root_gadget
,
my_scope
,
my_method
,
argument
_list
)
{
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
my_root_gadget
.
getDeclaredGadget
(
my_scope
);
})
.
push
(
function
(
my_gadget
)
{
if
(
my_param
_list
)
{
return
my_gadget
[
my_method
].
apply
(
my_gadget
,
my_param
_list
);
if
(
argument
_list
)
{
return
my_gadget
[
my_method
].
apply
(
my_gadget
,
argument
_list
);
}
return
my_gadget
[
my_method
]();
});
...
...
@@ -296,14 +296,23 @@
// XXX Those methods may be directly integrated into the header,
// as it handles the submit triggering
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
()
{
return
route
(
this
,
"
header
"
,
'
notifySubmitting
'
);
.
allowPublicAcquisition
(
'
notifySubmitting
'
,
function
(
argument_list
)
{
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitting
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
)
]);
})
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
()
{
return
route
(
this
,
"
header
"
,
"
notifySubmitted
"
);
.
allowPublicAcquisition
(
'
notifySubmitted
'
,
function
(
argument_list
)
{
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifySubmitted
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
)
]);
})
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
()
{
return
route
(
this
,
"
header
"
,
'
notifyChange
'
);
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
)
{
return
RSVP
.
all
([
route
(
this
,
"
header
"
,
'
notifyChange
'
),
route
(
this
,
"
notification
"
,
'
notify
'
,
argument_list
)
]);
})
.
allowPublicAcquisition
(
'
refresh
'
,
function
()
{
...
...
@@ -491,7 +500,7 @@
});
})
// Render the page
.
declareMethod
(
'
render
'
,
function
(
route_result
)
{
.
declareMethod
(
'
render
'
,
function
(
route_result
,
keep_message
)
{
var
gadget
=
this
;
// Reinitialize the loading counter
...
...
@@ -504,16 +513,14 @@
return
increaseLoadingCounter
(
gadget
);
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
panel
'
);
})
.
push
(
function
(
panel_gadget
)
{
return
panel_gadget
.
close
();
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
editor_panel
'
);
})
.
push
(
function
(
editor_panel
)
{
return
editor_panel
.
close
();
var
promise_list
=
[
route
(
gadget
,
'
panel
'
,
'
close
'
),
route
(
gadget
,
'
editor_panel
'
,
'
close
'
)
];
if
(
keep_message
!==
true
)
{
promise_list
.
push
(
route
(
gadget
,
'
notification
'
,
'
close
'
));
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
return
gadget
.
changeState
({
url
:
route_result
.
url
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
3bd5a1cc
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.51095.28081.35481
</string>
</value>
<value>
<string>
95
6.5832.50053.43878
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
148
1033822.43
</float>
<float>
148
2250162.82
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
View file @
3bd5a1cc
...
...
@@ -1214,6 +1214,33 @@ div[data-gadget-scope='erp5_searchfield'] button {
}
}
/**********************************************
* Notification
**********************************************/
div
[
data-gadget-scope
=
'notification'
]
{
position
:
fixed
;
z-index
:
99999
;
bottom
:
12pt
;
right
:
-192pt
;
transition
:
transform
200ms
ease-out
;
transform
:
translate3d
(
0
,
0
,
0
);
}
div
[
data-gadget-scope
=
'notification'
]
.visible
{
transform
:
translate3d
(
-216pt
,
0
,
0
);
}
@media
only
screen
and
(
max-width
:
45em
)
{
div
[
data-gadget-scope
=
'notification'
]
.visible
{
transform
:
translate3d
(
-198pt
,
0
,
0
);
}
}
div
[
data-gadget-scope
=
'notification'
]
button
{
text-align
:
left
;
width
:
180pt
;
padding
:
12pt
;
background-color
:
#FF6600
;
color
:
#f8fff3
;
border-radius
:
0.325em
;
}
/**********************************************
* JQM
**********************************************/
.ui-disabled
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
View file @
3bd5a1cc
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.33777.42224.15633
</string>
</value>
<value>
<string>
95
6.4331.30558.53367
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
148
0337940.73
</float>
<float>
148
2165005.75
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_html.html
0 → 100644
View file @
3bd5a1cc
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Notification
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_notification.js"
type=
"text/javascript"
></script>
</head>
<body>
<button
type=
"submit"
></button>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_html.xml
0 → 100644
View file @
3bd5a1cc
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_js.js
0 → 100644
View file @
3bd5a1cc
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, Node, rJS */
(
function
(
window
,
Node
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
notify
'
,
function
(
message
)
{
if
(
typeof
message
===
"
string
"
)
{
// alertify.log(message);
return
this
.
changeState
({
visible
:
true
,
message
:
message
});
}
return
this
.
changeState
({
visible
:
false
});
})
.
declareMethod
(
'
close
'
,
function
()
{
return
this
.
changeState
({
visible
:
false
});
})
.
onStateChange
(
function
(
modification_dict
)
{
if
(
modification_dict
.
hasOwnProperty
(
'
visible
'
))
{
if
(
this
.
state
.
visible
)
{
if
(
!
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
toggle
(
'
visible
'
);
}
}
else
{
if
(
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
remove
(
'
visible
'
);
}
}
}
if
(
modification_dict
.
hasOwnProperty
(
'
message
'
))
{
var
button
=
this
.
element
.
querySelector
(
'
button
'
);
button
.
textContent
=
this
.
state
.
message
;
}
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
if
((
evt
.
target
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
(
evt
.
target
.
tagName
===
'
BUTTON
'
))
{
return
this
.
close
();
}
},
false
,
false
);
}(
window
,
Node
,
rJS
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_notification_js.xml
0 → 100644
View file @
3bd5a1cc
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
3bd5a1cc
...
...
@@ -150,8 +150,13 @@
.
push
(
function
(
evt
)
{
var
location
=
evt
.
target
.
getResponseHeader
(
"
X-Location
"
),
jio_key
,
list
=
[];
list
.
push
(
form_gadget
.
notifySubmitted
());
list
=
[],
message
;
try
{
message
=
JSON
.
parse
(
evt
.
target
.
response
).
portal_status_message
;
}
catch
(
ignore
)
{
}
list
.
push
(
form_gadget
.
notifySubmitted
(
message
));
if
(
redirect_to_parent
)
{
list
.
push
(
form_gadget
.
redirect
({
command
:
'
history_previous
'
}));
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
3bd5a1cc
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.61270.41903.785
0
</string>
</value>
<value>
<string>
95
6.5836.52322.4096
0
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
148
1644270.46
</float>
<float>
148
2747274.44
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
3bd5a1cc
...
...
@@ -133,7 +133,14 @@
)
]);
})
.
push
(
form_gadget
.
notifySubmitted
.
bind
(
form_gadget
))
.
push
(
function
(
result_list
)
{
var
message
;
try
{
message
=
JSON
.
parse
(
result_list
[
1
].
target
.
responseText
).
portal_status_message
;
}
catch
(
ignore
)
{
}
return
form_gadget
.
notifySubmitted
(
message
);
})
.
push
(
function
()
{
return
form_gadget
.
redirect
({
command
:
'
reload
'
});
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
3bd5a1cc
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.25821.46431.41233
</string>
</value>
<value>
<string>
95
6.14116.17826.62532
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14
76194167.3
1
</float>
<float>
14
82747207.4
1
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
View file @
3bd5a1cc
...
...
@@ -836,6 +836,8 @@
.
declareMethod
(
'
redirect
'
,
function
(
options
)
{
this
.
props
.
form_content
=
options
.
form_content
;
// XXX Should we make it a second method parameter
this
.
props
.
keep_message
=
true
;
delete
options
.
form_content
;
return
this
.
getCommandUrlFor
(
options
)
.
push
(
function
(
hash
)
{
...
...
@@ -867,7 +869,11 @@
})
.
push
(
function
(
route_result
)
{
if
((
route_result
!==
undefined
)
&&
(
route_result
.
url
!==
undefined
))
{
return
gadget
.
renderApplication
(
route_result
);
return
gadget
.
renderApplication
(
route_result
,
gadget
.
props
.
keep_message
)
.
push
(
function
(
result
)
{
gadget
.
props
.
keep_message
=
false
;
return
result
;
});
}
});
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
View file @
3bd5a1cc
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.30668.10467.53777
</string>
</value>
<value>
<string>
95
6.5821.18325.27016
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>
14
79894490.37
</float>
<float>
14
82251886.14
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_site_module/renderjs_runner.xml
View file @
3bd5a1cc
...
...
@@ -586,7 +586,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.
19449.23623.527
3
</string>
</value>
<value>
<string>
955.
51162.4768.3512
3
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -604,7 +604,7 @@
</tuple>
<state>
<tuple>
<float>
14
79222772.0
9
</float>
<float>
14
82249905.6
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
View file @
3bd5a1cc
...
...
@@ -1413,6 +1413,34 @@ div[data-gadget-scope='erp5_searchfield'] {
}
}
/**********************************************
* Notification
**********************************************/
div[data-gadget-scope='notification'] {
position: fixed;
z-index: 99999;
bottom: @double-margin-size;
right: -@panelwidth - @double-margin-size;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
&.visible {
transform: translate3d(-@panelwidth - @double-margin-size - @main-margin-size-desktop, 0, 0);
@media @smartphone {
transform: translate3d(-@panelwidth - @double-margin-size - @main-margin-size-smartphone, 0, 0);
}
}
button {
text-align: left;
width: @panelwidth;
padding: @double-margin-size;
background-color: @coloraccent;
color: @colorsubheaderlink;
border-radius: @border-radius;
}
}
/**********************************************
* JQM
**********************************************/
...
...
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