Mercurial > repos > eduardo > annotateviz
diff static/js/gff_app.js @ 0:7537482eed36 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotateviz commit 9bbaa3eacc76ff3bf2b6da313cc0d85705f15dd1-dirty
author | eduardo |
---|---|
date | Sat, 17 Jun 2017 13:31:06 -0400 |
parents | |
children | 92921dfea0b5 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/static/js/gff_app.js Sat Jun 17 13:31:06 2017 -0400 @@ -0,0 +1,39 @@ +/** + * Created by wh_admin on 14/06/2017. + */ +var app = angular.module('app', ['ngTouch', 'ui.grid','ui.grid.grouping', 'ui.grid.pagination', 'ui.grid.exporter']); + +app.controller('MainCtrl', ['$scope', '$http', '$interval', 'uiGridGroupingConstants', function ($scope, $http, $interval, uiGridGroupingConstants ){ + $scope.gridOptions = { + enableFiltering: true, + enableGridMenu: true, + enableSelectAll: true, + exporterCsvFilename: 'myFile.csv', + exporterMenuPdf: false, + treeRowHeaderAlwaysVisible: false, + paginationPageSizes: [25, 50], + paginationPageSize: 25, + exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), + //enableHorizontalScrollbar: 0, + //enableVerticalScrollbar: 1, + columnDefs: [ + { name: 'contig', grouping: { groupPriority: 0 }, sort: { priority: 0, direction: 'desc' }, width: '25%', cellTemplate: '<div><div ng-if="!col.grouping || col.grouping.groupPriority === undefined || col.grouping.groupPriority === null || ( row.groupHeader && col.grouping.groupPriority === row.treeLevel )" class="ui-grid-cell-contents" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div></div>' }, + { name: 'mRNA', grouping: { groupPriority: 1 }, sort: { priority: 1,direction: 'desc' }, width: '25%', cellTemplate: '<div><div ng-if="!col.grouping || col.grouping.groupPriority === undefined || col.grouping.groupPriority === null || ( row.groupHeader && col.grouping.groupPriority === row.treeLevel )" class="ui-grid-cell-contents" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div></div>' }, + { name: 'prediction', width: '25%' }, + { name: 'source', width: '10%' }, + { name: 'score', width: '5%'}, + ], + onRegisterApi: function( gridApi ) { + $scope.gridApi = gridApi; + } + }; + + //var baseurl= '/api/datasets/'+hdaId+'?provider=sqlite-dict&data_type=raw_data&query='; + //var select="select%20seqid,seqid,source,featuretype,start,end,score,strand,frame,attributes%20from%20features"; + //var url= baseurl + select; + $http.get('trans.json') + .success (function(response){ + $scope.gridOptions.data = response; + //mygridOptions.totalItems = mygridOptions.data.length; + });//end get_url +}]) \ No newline at end of file