Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-dynfield
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-dynfield
Commits
a6f96351
Commit
a6f96351
authored
Jun 13, 2013
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- added DHTML filter to table
parent
5cfe993b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
27 deletions
+51
-27
permissions.adp
www/permissions.adp
+31
-3
permissions.tcl
www/permissions.tcl
+20
-24
No files found.
www/permissions.adp
View file @
a6f96351
...
...
@@ -6,7 +6,35 @@
<property name="left_navbar">@left_navbar_html;noquote@</property>
</if>
@table;noquote@
<script type="text/javascript">
$(document).ready(function () {
function hideCol($table, idx) {
if (idx != 1 && idx != 2) {
$('td:nth-child(' + idx + '),th:nth-child(' + idx + ')').hide();
}
}
function showCol($table, idx) {
$('td:nth-child(' + idx + '),th:nth-child(' + idx + ')').show();
}
$("select").change(function () {
var $table = $("#editable_table"),
cols = $(this).val();
if (cols != null) {
for (var i = 1; i <= $table.find("th").length; i++) {
if (cols.indexOf(i + '') === -1) {
hideCol($table, i);
}
else {
showCol($table, i);
};
};
} else {
for (var i = 1; i <= $table.find("th").length; i++) {
hideCol($table, i);
};
};
});
});
</script>
@table;noquote@
www/permissions.tcl
View file @
a6f96351
...
...
@@ -64,8 +64,8 @@ set bgcolor(1) " class=roweven"
set
table_header
"
<tr>
<t
d class=rowtitle>Object Type</td
>
<t
d class=rowtitle>Attribute</td
>
<t
h>Object Type</th
>
<t
h>Attribute</th
>
\n
"
...
...
@@ -90,6 +90,7 @@ set object_type_constraint "1 = 1"
set
group_ids
[
list
]
set
group_names
[
list
]
set
column_selects
""
db_foreach group_list
$group
_list_sql
{
...
...
@@ -100,13 +101,14 @@ db_foreach group_list $group_list_sql {
append main_sql_select
"
\t
im_object_permission_p(fa.attribute_id,
$group
_id, 'write') as p
${group_id}
_write_p,
\n
"
append table_header
"
<t
d class=rowtitle
><A href=
$group
_url?group_id=
$group
_id>
<t
h
><A href=
$group
_url?group_id=
$group
_id>
[
im_gif
$profile
_gif
$group
_name
]
</A></t
d
>
\n
"
</A></t
h
>
\n
"
incr num_groups
append column_selects
"<option value='
[
expr
$num
_groups+2
]
' selected='selected'>
$group
_name</option>"
}
append
table_header
"
<t
d class=rowtitle>
[
im_gif del
"Delete Dynfield"
]
</td
>
<t
h>
[
im_gif del
"Delete Dynfield"
]
</th
>
</tr>
"
...
...
@@ -118,7 +120,7 @@ append table_header "
set
table
"
<form action=dynfield-action method=post>
[
export_form_vars object_type return_url
]
<table>
<table
id='editable_table'
>
$table
_header
\n
"
set
object_type_where
""
...
...
@@ -161,6 +163,7 @@ set attributes_sql "
set
ctr 0
set
old_package_name
""
db_foreach attributes
$attributes
_sql
{
incr ctr
append table
"
\n
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
...
...
@@ -197,18 +200,9 @@ db_foreach attributes $attributes_sql {
set letter
"<b>W</b>"
}
set write
"<A href=
$toggle
_url?
[
export_url_vars horiz_group_id object_id action return_url
]
>
$letter
</A>"
append table
"
<td align=center>
$read$write
</td>
"
append table
"<td align=center>
$read
$write
</td>"
}
append table
"
<td>
<input type=checkbox name=attribute_id.
$im
_dynfield_attribute_id>
</td>
append table
"<td><input type=checkbox name=attribute_id.
$im
_dynfield_attribute_id></td>
</tr>
"
}
...
...
@@ -218,11 +212,6 @@ append table "
</form>
"
# ------------------------------------------------------------------
# Left Navigation Bar
# ------------------------------------------------------------------
...
...
@@ -230,9 +219,16 @@ append table "
set
left_navbar_html
"
<div class=
\"
filter-block
\"
>
<div class=
\"
filter-title
\"
>
[
lang::message::lookup
""
intranet-dynfield.DynField_Admin
"DynField Admin"
]
[
lang::message::lookup
""
intranet-dynfield.DynField_Admin
"DynField Admin"
]
:
</div>
[
im_dynfield::left_navbar
]
[
im_dynfield::left_navbar
]
</div>
<hr/>
<div class=
\"
filter-block
\"
>
<div class=
\"
filter-title
\"
>
[
lang::message::lookup
""
intranet-dynfield.Filter
"Filter"
]
:
</div>
<select multiple='multiple' size='10'>
$column
_selects</select>
</div>
<br>
"
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