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
Show 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,12 +346,15 @@
...
@@ -346,12 +346,15 @@
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
table
=
gadget
.
element
.
querySelector
(
"
table
"
),
var
table
=
gadget
.
element
.
querySelector
(
"
table
"
),
old_container
;
if
(
table
)
{
old_container
=
table
.
querySelector
(
container_name
);
old_container
=
table
.
querySelector
(
container_name
);
if
(
old_container
)
{
if
(
old_container
)
{
table
.
replaceChild
(
container
,
old_container
);
table
.
replaceChild
(
container
,
old_container
);
}
else
{
}
else
{
table
.
appendChild
(
container
);
table
.
appendChild
(
container
);
}
}
}
return
table
;
return
table
;
});
});
}
}
...
@@ -914,6 +917,7 @@
...
@@ -914,6 +917,7 @@
domsugar
(
table_element
.
querySelector
(
'
tr
'
),
th_element_list
);
domsugar
(
table_element
.
querySelector
(
'
tr
'
),
th_element_list
);
if
(
gadget
.
state
.
extended_search
)
{
domsugar
(
container
,
[
domsugar
(
container
,
[
domsugar
(
'
div
'
,
{
domsugar
(
'
div
'
,
{
"
class
"
:
'
ui-table-header ui-header
'
"
class
"
:
'
ui-table-header ui-header
'
...
@@ -921,6 +925,7 @@
...
@@ -921,6 +925,7 @@
table_element
,
table_element
,
domsugar
(
'
nav
'
)
domsugar
(
'
nav
'
)
]);
]);
}
});
});
}
}
...
@@ -932,14 +937,17 @@
...
@@ -932,14 +937,17 @@
result_queue
result_queue
.
push
(
function
()
{
.
push
(
function
()
{
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
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
;
tbody_classList
=
gadget
.
element
.
querySelector
(
"
table
"
).
querySelector
(
"
tbody
"
).
classList
;
// Set the loading icon and trigger line calculation
// Set the loading icon and trigger line calculation
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
// remove pagination information
// remove pagination information
loading_element
.
textContent
=
''
;
loading_element
.
textContent
=
''
;
tbody_classList
.
add
(
disabled_class
);
tbody_classList
.
add
(
disabled_class
);
}
return
gadget
.
fetchLineContent
(
false
);
return
gadget
.
fetchLineContent
(
false
);
});
});
...
@@ -1171,9 +1179,12 @@
...
@@ -1171,9 +1179,12 @@
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
loading_element_classList
;
if
(
loading_element
)
{
loading_element_classList
=
loading_element
.
classList
;
loading_element_classList
=
loading_element
.
classList
;
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element
.
textContent
=
'
(
'
+
pagination_message
+
'
)
'
;
loading_element
.
textContent
=
'
(
'
+
pagination_message
+
'
)
'
;
}
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
sub_element_list
=
[
var
sub_element_list
=
[
...
@@ -1190,6 +1201,7 @@
...
@@ -1190,6 +1201,7 @@
})
})
);
);
}
}
if
(
!
gadget
.
state
.
extended_search
)
{
domsugar
(
gadget
.
element
.
querySelector
(
"
.graphic_section
"
),
[
domsugar
(
gadget
.
element
.
querySelector
(
"
.graphic_section
"
),
[
domsugar
(
"
select
"
,
{
domsugar
(
"
select
"
,
{
"
name
"
:
"
GraphicSelect
"
,
"
name
"
:
"
GraphicSelect
"
,
...
@@ -1197,9 +1209,12 @@
...
@@ -1197,9 +1209,12 @@
},
sub_element_list
),
},
sub_element_list
),
domsugar
(
"
div
"
,
{
"
class
"
:
"
graphic_area
"
})
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
result_queue
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
declareGadget
(
'
gadget_graphic.html
'
,
{
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 @@
...
@@ -240,7 +240,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.
10044.21385.7219
</string>
</value>
<value>
<string>
997.
21665.57108.32682
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
164
0784531.93
</float>
<float>
164
1481115.02
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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