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
Frederic Thoma
erp5
Commits
351d1470
Commit
351d1470
authored
Jan 06, 2022
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: prototype to only display listbox if there is search query
parent
58ad111a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
30 deletions
+45
-30
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+43
-28
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
351d1470
...
...
@@ -346,11 +346,14 @@
})
.
push
(
function
()
{
var
table
=
gadget
.
element
.
querySelector
(
"
table
"
),
old_container
;
if
(
table
)
{
old_container
=
table
.
querySelector
(
container_name
);
if
(
old_container
)
{
table
.
replaceChild
(
container
,
old_container
);
}
else
{
table
.
appendChild
(
container
);
if
(
old_container
)
{
table
.
replaceChild
(
container
,
old_container
);
}
else
{
table
.
appendChild
(
container
);
}
}
return
table
;
});
...
...
@@ -914,13 +917,15 @@
domsugar
(
table_element
.
querySelector
(
'
tr
'
),
th_element_list
);
domsugar
(
container
,
[
domsugar
(
'
div
'
,
{
"
class
"
:
'
ui-table-header ui-header
'
},
div_element_list
),
table_element
,
domsugar
(
'
nav
'
)
]);
if
(
gadget
.
state
.
extended_search
)
{
domsugar
(
container
,
[
domsugar
(
'
div
'
,
{
"
class
"
:
'
ui-table-header ui-header
'
},
div_element_list
),
table_element
,
domsugar
(
'
nav
'
)
]);
}
});
}
...
...
@@ -932,14 +937,17 @@
result_queue
.
push
(
function
()
{
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
loading_element_classList
=
loading_element
.
classList
,
loading_element_classList
,
tbody_classList
;
if
(
loading_element
)
{
loading_element_classList
=
loading_element
.
classList
;
tbody_classList
=
gadget
.
element
.
querySelector
(
"
table
"
).
querySelector
(
"
tbody
"
).
classList
;
// Set the loading icon and trigger line calculation
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
// remove pagination information
loading_element
.
textContent
=
''
;
tbody_classList
.
add
(
disabled_class
);
// Set the loading icon and trigger line calculation
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
// remove pagination information
loading_element
.
textContent
=
''
;
tbody_classList
.
add
(
disabled_class
);
}
return
gadget
.
fetchLineContent
(
false
);
});
...
...
@@ -1171,9 +1179,12 @@
})
.
push
(
function
()
{
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
loading_element_classList
;
if
(
loading_element
)
{
loading_element_classList
=
loading_element
.
classList
;
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element
.
textContent
=
'
(
'
+
pagination_message
+
'
)
'
;
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element
.
textContent
=
'
(
'
+
pagination_message
+
'
)
'
;
}
})
.
push
(
function
()
{
var
sub_element_list
=
[
...
...
@@ -1190,16 +1201,20 @@
})
);
}
domsugar
(
gadget
.
element
.
querySelector
(
"
.graphic_section
"
),
[
domsugar
(
"
select
"
,
{
"
name
"
:
"
GraphicSelect
"
,
"
value
"
:
gadget
.
state
.
graphic_type
},
sub_element_list
),
domsugar
(
"
div
"
,
{
"
class
"
:
"
graphic_area
"
})
]);
if
(
!
gadget
.
state
.
extended_search
)
{
domsugar
(
gadget
.
element
.
querySelector
(
"
.graphic_section
"
),
[
domsugar
(
"
select
"
,
{
"
name
"
:
"
GraphicSelect
"
,
"
value
"
:
gadget
.
state
.
graphic_type
},
sub_element_list
),
domsugar
(
"
div
"
,
{
"
class
"
:
"
graphic_area
"
})
]);
}
});
});
if
(
gadget
.
state
.
graphic_type
&&
gadget
.
state
.
graphic_type
!==
""
)
{
if
(
!
gadget
.
state
.
extended_search
&&
gadget
.
state
.
graphic_type
&&
gadget
.
state
.
graphic_type
!==
""
)
{
result_queue
.
push
(
function
()
{
return
gadget
.
declareGadget
(
'
gadget_graphic.html
'
,
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
351d1470
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.
10044.21385.7219
</string>
</value>
<value>
<string>
997.
21665.57108.32682
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
164
0784531.93
</float>
<float>
164
1481115.02
</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