Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset column selection #262

Open
wants to merge 160 commits into
base: quarter2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
49b0a95
flyout init
Feb 7, 2020
98ba02f
cleaning up and finish first pass
Mar 17, 2020
ac78dab
tables first pass fuctionality, and some styling
Mar 20, 2020
08b11d6
and the styles
Mar 20, 2020
e956578
styling, fonts, pagination arrows
Mar 23, 2020
810b714
font-awesome support, custom checkboxes, and row select styling
Mar 25, 2020
cd9573b
checkbox select row highlight, header checkbox toggle all rows
Mar 26, 2020
0bf94fd
tweak shadow
Mar 26, 2020
5f5df1c
server side implementation with existing api
Apr 8, 2020
863aa66
server side table view first pass
Apr 8, 2020
bdcbc8f
Initial commit for a backend table call for users.
DerekEdwards Apr 8, 2020
bc829b2
rename users to rows in the user table call
DerekEdwards Apr 8, 2020
e6ed7d0
Add pagination to users call.
DerekEdwards Apr 9, 2020
22c3a6c
Return basic search functionality for user. This currently only works…
DerekEdwards Apr 10, 2020
879f67c
Return basic search functionality for user. This currently only works…
DerekEdwards Apr 10, 2020
70a2ffa
TTPLAT-1477 Add searchable columns to user table and replace placehol…
DerekEdwards Apr 11, 2020
17e3736
TTPAT-1477 Add Unit Tests for User Query Table
DerekEdwards Apr 12, 2020
d4e94d2
updated font_awesome dep, reverted unintended footer changes, updated…
Apr 13, 2020
619c0af
take out unneeded json resopnse
Apr 14, 2020
cb780d7
Online Users
Apr 29, 2020
ddb0bfe
column styling change, notices, activity log
May 5, 2020
1aa0b0c
Merge remote-tracking branch 'origin/quarter2' into table-library
NJBL May 5, 2020
55ea0e2
Merge branch 'table-library' of https://github.com/camsys/transam_cor…
NJBL May 5, 2020
3f2cd40
Update version.
DerekEdwards May 5, 2020
5f42f33
broken merge
May 5, 2020
a51eb7b
Merge branch 'table-library' into 2.11.0
NJBL May 5, 2020
5c659e6
server side search param hotfix
NJBL May 6, 2020
fce9147
bump version
NJBL May 6, 2020
01f0ef3
import/export, saved queries, groups, column select fix
NJBL May 7, 2020
d622917
TTPAT-1477 Fix bug with counting users.
DerekEdwards May 7, 2020
4ad69c2
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards May 7, 2020
fd5b98c
notices columns fix
NJBL May 7, 2020
31ad0cc
Add more details to the user rowify test.
DerekEdwards May 9, 2020
0ba912a
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards May 9, 2020
6261f74
queueing the add row execution as to control the order of operations,…
NJBL May 11, 2020
fde6c45
Merge branch 'develop' of https://github.com/camsys/transam_core into…
NJBL May 11, 2020
7fff28a
server side add row fix
NJBL May 12, 2020
79df444
enforce server side add row
NJBL May 12, 2020
247a4c6
TTPLAT-1559 Each user has table sorting preferences. (#258)
DerekEdwards May 13, 2020
2834997
page select rework: double arrow, min-width
NJBL May 13, 2020
43ca1d6
TTPLAT-1560 Able to Update User Table Preferences (#259)
DerekEdwards May 14, 2020
e087584
1) add row based on index attribute with filtering to add rows accura…
NJBL May 14, 2020
cfa1d2d
1) return index_actions 2) functional drilldown on last name
NJBL May 14, 2020
9370bc2
1) right align style 2) column type fix
NJBL May 14, 2020
b7b510d
Merge branch '2.11.0' of https://github.com/camsys/transam_core into …
NJBL May 14, 2020
bbb11a0
remove comment
NJBL May 14, 2020
07070f9
Merge branch '2.11.0' into develop
NJBL May 14, 2020
4840f49
notices drilldown
NJBL May 15, 2020
6a35684
Merge branch '2.11.0' into develop
NJBL May 15, 2020
7696614
handling unsanitized html from db, notices right aligned columns
NJBL May 15, 2020
d09523c
handling unsanitzed html from db, notices right align column
NJBL May 15, 2020
0975d13
Merge branch '2.11.0' into develop
NJBL May 15, 2020
79d71be
TTPLAT-1563 Make User Role Searchable on User Tbale (#260)
DerekEdwards May 18, 2020
79e9be6
right align saved queries
NJBL May 18, 2020
a55a165
Merge branch '2.11.0' into develop
NJBL May 18, 2020
d399009
groups drilldown link, name correction
NJBL May 18, 2020
86b4f2b
bulk updates right align date
NJBL May 18, 2020
9df8547
Fix migration to create views for user role searching.
DerekEdwards May 19, 2020
d685b07
All Role objects should have a label.
DerekEdwards May 19, 2020
e373e29
initial commit
DerekEdwards May 18, 2020
2445625
Merge branch '2.11.0' into develop
NJBL May 19, 2020
b5dfe46
server side search fix
NJBL May 19, 2020
e1c946b
users column spacing
NJBL May 19, 2020
32a2c3f
new method of apply table/column specific styling after server side h…
NJBL May 21, 2020
849c751
hover box wraps text, and ugly hack to get actions back in the saved …
NJBL May 22, 2020
6aeec6f
bulk updates drilldown
NJBL May 22, 2020
79c5b79
improved performance of header checkbox select/deselect all on large …
NJBL May 22, 2020
d307877
actions column hack fix, actions dont wrap
NJBL May 22, 2020
358cdf7
asset groups drilldown
NJBL May 22, 2020
efc56a2
fix globe icon, include javascript locally instead of per view, messa…
NJBL May 26, 2020
640ca58
explicit pixels on checkbox width
NJBL May 26, 2020
266648c
apply styles server side
NJBL May 28, 2020
a8b9b1d
checkmark centering
NJBL May 28, 2020
fd57f3e
message templates checkmark styling
NJBL May 28, 2020
81ffc9b
merge
NJBL May 28, 2020
7ddf1e5
css for checkmark centering
NJBL May 28, 2020
915efd1
TTPLAT-1471 Update the Online Users Table and Only show Active Users.
DerekEdwards May 29, 2020
46ea545
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards May 29, 2020
f7995c2
TTPLAT-1469 Only return 1000 most recent asset activity items.
DerekEdwards May 29, 2020
0c4f6db
LIBRARY UPDATE: columns refernced by index, integrated col types and …
NJBL Jun 1, 2020
a6fc39b
Update user rowify
DerekEdwards Jun 1, 2020
9f05d27
Merge
DerekEdwards Jun 1, 2020
26b2064
library tweaks, users table
NJBL Jun 2, 2020
db89b33
Merge branch 'develop' of https://github.com/camsys/transam_core into…
NJBL Jun 2, 2020
75377e7
Merge develop into 2.11.0
DerekEdwards Jun 2, 2020
9fac13e
Fix merge conflict.
DerekEdwards Jun 2, 2020
db256a3
Fix Online Users Table
DerekEdwards Jun 2, 2020
85aeb2e
url empty check fix
NJBL Jun 2, 2020
676144e
activity logs drilldown
NJBL Jun 3, 2020
554c66c
temp storing work
NJBL Jun 3, 2020
f23fb2c
prevent checkmark delayed animations
NJBL Jun 3, 2020
01ce04b
Fix formatting bug with Infrastructure Rowify
DerekEdwards Jun 3, 2020
1bc0598
Merge branch '2.11.0' of https://github.com/camsys/transam_core into …
DerekEdwards Jun 3, 2020
635ccfd
server side search clear search results when search box is empty
NJBL Jun 4, 2020
6d56c32
Merge branch '2.11.0' into develop
NJBL Jun 4, 2020
859a78a
update formatting on Online Users Table
DerekEdwards Jun 4, 2020
3285ccf
Merge branch '2.11.0' of https://github.com/camsys/transam_core into …
DerekEdwards Jun 4, 2020
358c4c9
message templates return js tag
NJBL Jun 4, 2020
67a3348
fiscal year delete FY
NJBL Jun 4, 2020
4568325
fiscal year delete FY
NJBL Jun 4, 2020
88819bf
first pass at column sorting on header click
NJBL Jun 5, 2020
65c5349
multiple client side tables on one page conflict issue fix
NJBL Jun 5, 2020
eda9235
Align action coumn to enter.
DerekEdwards Jun 8, 2020
bb6a63e
Merge branch 'develop' into 2.11.0
DerekEdwards Jun 8, 2020
2515b31
Merge branch 'quarter2' into develop
DerekEdwards Jun 8, 2020
ef6d071
Merge branch 'develop' into 2.11.0
DerekEdwards Jun 8, 2020
c497802
Update table prefs format
DerekEdwards Jun 8, 2020
469c454
Merge branch 'develop' of https://github.com/camsys/transam_core into…
NJBL Jun 8, 2020
b610c79
use user table preferences
NJBL Jun 8, 2020
637a5a5
remove misplaced code
NJBL Jun 8, 2020
41ce113
remove mistaken code
NJBL Jun 8, 2020
ce92bc2
update comparator to handle both numbers and strings
NJBL Jun 8, 2020
457a3d4
client side sorting working, added table codes to each view
NJBL Jun 9, 2020
71f102a
sorting improvements/error handling, table codes
NJBL Jun 10, 2020
d611874
users table column codes
NJBL Jun 10, 2020
d4f3b56
Merge branch '2.11.0' into develop
NJBL Jun 10, 2020
3b61c41
update table name for facilities in table preferences
DerekEdwards Jun 12, 2020
7217cc2
styling for custom drilldown
NJBL Jun 15, 2020
f878600
build travis on develop and 2.x.x
DerekEdwards Jun 15, 2020
b127315
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards Jun 15, 2020
6723c6c
Update test for users table.
DerekEdwards Jun 17, 2020
7652958
Update the format of the update user preferences call.
DerekEdwards Jun 18, 2020
23e6782
Merge branch 'quarter2' into 2.11.0
DerekEdwards Jun 18, 2020
28600e5
Merge branch '2.11.0' of https://github.com/camsys/transam_core into …
DerekEdwards Jun 18, 2020
386b6ef
Add track and guideway sorting
DerekEdwards Jun 18, 2020
f12b8b9
Merge 2.11.0 into develop
DerekEdwards Jun 18, 2020
72e396b
Add update user sort method for users.
DerekEdwards Jun 18, 2020
a7252e6
sorting icons and preliminary multi-sort option, with table preferenc…
NJBL Jun 18, 2020
71fc8bb
Add sort library for power and signal table.
DerekEdwards Jun 18, 2020
e4e017b
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards Jun 18, 2020
f015ed8
Add sort library for capital equipment'
DerekEdwards Jun 19, 2020
3e43215
Add sort library for service vehicles
DerekEdwards Jun 19, 2020
e7fa1ca
Add sorting library to revenue vehicles and facilities.
DerekEdwards Jun 19, 2020
5240108
Add comments
DerekEdwards Jun 19, 2020
529ab47
Add sorting to user table.
DerekEdwards Jun 19, 2020
6eeaec9
sort_params format, buckets table selected
NJBL Jun 19, 2020
2e0abad
sorting refresh client side
NJBL Jun 22, 2020
f278689
Add sorting rules for projects
DerekEdwards Jun 23, 2020
eb1ce45
TTPLAT-1596 Don't allow vendor names to have apostrophe's
DerekEdwards Jun 24, 2020
fdf857d
server side sorting support, loading indicator, column codes, table c…
NJBL Jun 24, 2020
7dc8b3b
abort previous request when a new request is made for each active tab…
NJBL Jun 24, 2020
5418382
Update FY XX-YY format to just be XX-YY
DerekEdwards Jun 24, 2020
b815205
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards Jun 24, 2020
dea0e36
Fix users controller tests
DerekEdwards Jun 24, 2020
bd33e54
init tab functionality
NJBL Jun 24, 2020
dbda78e
Merge branch 'develop' of https://github.com/camsys/transam_core into…
NJBL Jun 24, 2020
c101281
Update user spec
DerekEdwards Jun 24, 2020
48bc944
Merge branch 'develop' of https://github.com/camsys/transam_core into…
DerekEdwards Jun 24, 2020
b29bcce
Update FY to not show the FY
DerekEdwards Jun 25, 2020
e08ec2e
Revert
DerekEdwards Jun 25, 2020
1ef4438
Fix role label seeds for dummy app
DerekEdwards Jun 25, 2020
cffb843
Fix user controller spec
DerekEdwards Jun 25, 2020
328219f
Add a method to remove table preferences
DerekEdwards Jun 25, 2020
88273ba
tab support for multiple of same table, in this case, the id is used …
NJBL Jun 25, 2020
6d0e0a5
pagination arrows
NJBL Jun 26, 2020
e8c7f62
drilldown link font awesome icon and animation, using post_styles to …
NJBL Jun 26, 2020
1375c99
main export commit
NJBL Jul 6, 2020
55d6644
abstract button styling
NJBL Jul 6, 2020
5cbf925
Initial commit
DerekEdwards Jul 7, 2020
cdd2ccf
Add defaults for column selection for assets.
DerekEdwards Jul 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ branches:
only:
- master
- /quarter\d*/
- develop
- /2.\d*.\d*/
env:
- TEST_SUITE=rspec
- TEST_SUITE=cucumber
Expand Down
24 changes: 24 additions & 0 deletions app/assets/javascripts/transam_core/flyout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// function closeFlyout() {
// for(var elem of document.getElementsByClassName("closeFlyout")){
// elem.addEventListener("click", function(){
// this.form.reset();
// });
// }
// }


function createFlyout(elem, before, append) {
$(document).ready(function(){
before;
$(elem + ":empty").append(append);
});
}

function toggleExtend(trigger, elem, isRight) {
if (isRight) {
$(trigger).on('click', function() {$(elem).toggleClass( "extend-right" )});
} else {
$(trigger).on('click', function() {$(elem).toggleClass( "extend-left" )});
elem.scrollLeft = window.innerWidth;
}
}
86 changes: 86 additions & 0 deletions app/assets/javascripts/transam_core/table-library/export.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
$(document).on('click', ".export_option", function(event){
event.stopPropagation();
const id = $(this).closest(".library-table").find("table").eq(0).attr('id');
if($(this).text().trim() === "csv") {
$(this).attr({ 'download': "output.csv", 'href': export_table(id, $(this).text().trim()), 'target': '_blank' });
} else if($(this).text().trim() === "txt") {
$(this).attr({ 'download': "output.txt", 'href': export_table(id, $(this).text().trim()), 'target': '_blank' });
} else if($(this).text().trim() === "excel") {
$(this).attr({ 'download': "output.xls", 'href': export_table(id, $(this).text().trim()), 'target': '_blank' });
}
$(this).closest('.export').eq(0).removeClass("open");
});





function export_table(id, type) {
const table = $('#'+id);
const header = table.find("tr:has(th)").eq(0).find(".header-item:not(.header-checkbox)");
let rows = [];
if($('#' + id + '_export_checkbox').is(':checked')) {
rows = table.find(".row-checked:has(td)");
} else {
rows = table.find("tr:has(td)");
}
let csv = "";
for(let cell of header){
csv = csv + $(cell).find(".header-text").text().replace(/,/g, '') + ",";
}
csv = csv + '\n';
for(let row of rows){
for(let c of $(row).find(".row-item")) {
if($(c).hasClass("action-column")) {
continue;
} else if($(c).hasClass("checkmark-column")) {
csv = csv + (($(c).find(".cell-text i").css("visibility") == "visible")? "Yes,": "No,");
} else {
csv = csv + $(c).find(".cell-text").text().replace(/,/g, '') + ",";
}
}
csv = csv + '\n';
}
if(type === "csv") {
csvData = 'data:application/csv;charset=utf-8,' + encodeURIComponent(csv);
return csvData;
} else if(type === "txt") {
csvData = 'data:application/txt;charset=utf-8,' + encodeURIComponent(csv);
return csvData;
} else if(type === "excel") {
csvData = 'data:application/xls;charset=utf-8,' + encodeURIComponent(csv);
return csvData;
}

}

function init_export(id, types) {
const table = $('#'+id);
$(document).ready(function(){
let wrapper = $('<div class="export">');
let button = $('<div class=" function_button export_button">').append('<i class="fas fa-file-download button-label button-icon" aria-hidden="true">');
let options = $('<div class="export_options">');
let selected_rows_checkbox = $('<div class="selected_rows_checkbox_wrapper">').append($('<input type="checkbox" class="selected_rows_checkbox" id="' + id + '_export_checkbox">')).append($('<label class="selected_rows_checkbox_label" for="' + id + '_export_checkbox">').text("Selected Rows Only"));
$(document).on('click', ".export", function(event){
event.stopPropagation();
event.stopImmediatePropagation();
$(this).toggleClass("open");
});
options.append($('<div class="export_label">').text("Export Data"));
options.append(selected_rows_checkbox);
for(let type of types){
options.append($('<a class="export_option">').text(type).prepend('<i class="fas fa-file-download button-label button-icon" aria-hidden="true">'));
}
wrapper.append(button).append(options);
table.parent().find(".function_bar").append(wrapper);

});
}


// close on click away
$(document).on('click', function(e){
if($(e.target).closest('.open').length === 0) {
$('.open').removeClass('open');
}
});
Loading