<commit_before>
(function() {
    "use strict";

    console.log('SearcherCtrl setup');
    define([
        'angular' //,
        // 'ngGrid'
    ], function(angular) {
        console.log('SearcherCtrl define');
        
        function SearcherCtrl($scope) {
            $scope.findGrpDisabled = false;
            $scope.searchTermGrp = "Chicago";
            $scope.searchTermMap = "Chicago Crime";
            $scope.signInOutGrp = "Sign In";
            $scope.signInOutMap = "Sign In";
            $scope.data = [
                {"owner" : "ca8219b99d9442a8b21cd61e71ee48b8","title" : "Somewhere in Chicago"},
                {"owner" : "0ba4d84db84e4564b936ec548ea91575","title" : "2013 Midwest Tornado Outbreak"}
                ];
            $scope.mapGriddata = [];
            $scope.gridMapOptions = { 
                data: 'mapGriddata',
                rowHeight: '50',
                /* 
                columnDefs: [
                    {field:'snippet',
                     displayName:'Description'},
                    {field:'title',
                     displayName:'Map Title'}  ,
                                    {field:'url',
                                     displayName:'Map Url'},
                                    {field:'thumbnail',
                                     displayName:'Map Thumbnail Url',
                                     cellTemplate: 'ImageTemplate.html'},
                                    {field:'id',
                                     displayName:'ID'},
                                    {field: 'owner',
                                     displayName: 'Map Owner'} 
                ]
                 */
            };
            var self = this;
            self.scope = $scope;
            
            var layoutPlugin = new ngGridLayoutPlugin();
            
            $scope.updateLayout = function(){
              layoutPlugin.updateGridLayout();
            };
    
            $scope.gridGrpOptions = { 
                data: 'data',
                // enablePaging: true,
                rowHeight: '50' ,
                // plugins: [layoutPlugin],
                columnDefs: [
                    {field:'title',
                     width: '120px',
                     displayName: 'Group'},
                    {field: 'owner',
                     width: '120px',
                     displayName: 'Owner'}
                ] 
            };
               // find groups based on input keyword
            $scope.findArcGISGroup = function(portalForSearch) {
              console.log('findArcGISGroup');
              var keyword = $scope.searchTermGrp;
              var params = {
                q:  keyword,
                num:20  //find 40 items - max is 100
               };
               portalForSearch.queryGroups(params).then(function (data) {
                $scope.showGroupResults(data);
               });
            }
            
            $scope.getGridStyle = function () {
                
                var vrbg = angular.element(document.getElementById("verbagePan"));
                var accHead = angular.element(document.getElementById("AccdianNews"));
                var srchWrap = angular.element(document.getElementById("searchToolWrapper"));
                var marginborder = (1 + 1) * 2;
                var accinnermarginborder = (1 + 9) * 2;<commit_msg>Prior to switching from cell templates to row template.<commit_after>
(function() {
    "use strict";

    console.log('SearcherCtrl setup');
    define([
        'angular' //,
        // 'ngGrid'
    ], function(angular) {
        console.log('SearcherCtrl define');
        
        function SearcherCtrl($scope) {
            $scope.findGrpDisabled = false;
            $scope.searchTermGrp = "Chicago";
            $scope.searchTermMap = "Chicago Crime";
            $scope.signInOutGrp = "Sign In";
            $scope.signInOutMap = "Sign In";
            $scope.data = [
                {"id" : "ca8219b99d9442a8b21cd61e71ee48b8","title" : "Somewhere in Chicago", "owner" : "foo", "thumbnail" : "foo.jpg"},
                {"id" : "0ba4d84db84e4564b936ec548ea91575","title" : "2013 Midwest Tornado Outbreak", "owner" : "bar", "thumbnail" : "bar.jpg"}
                ];
            $scope.mapGriddata = [];
            $scope.gridMapOptions = { 
                data: 'mapGriddata',
                rowHeight: '50',
                /* 
                columnDefs: [
                    {field:'snippet',
                     displayName:'Description'},
                    {field:'title',
                     displayName:'Map Title'}  ,
                                    {field:'url',
                                     displayName:'Map Url'},
                                    {field:'thumbnail',
                                     displayName:'Map Thumbnail Url',
                                     cellTemplate: 'ImageTemplate.html'},
                                    {field:'id',
                                     displayName:'ID'},
                                    {field: 'owner',
                                     displayName: 'Map Owner'} 
                ]
                 */
            };
            var self = this;
            self.scope = $scope;
            
            var layoutPlugin = new ngGridLayoutPlugin();
            
            $scope.updateLayout = function(){
              layoutPlugin.updateGridLayout();
            };
            
            var webmpid = "<KEY>";
            $scope.token = "?token=<KEY>";
            
            $scope.imgUrlBase = "http://www.arcgis.com/sharing/rest/content/items/info/thumbnail/"
            $scope.imgTmplt = 
                '<img ng-src="{{imgUrlBase}}{{row.getProperty(col.field)}}" width="50" height="50" />'
                
                // '<img ng-src="{{imgUrlBase}}{{row.getProperty(col.field)}}{{token}}" width="50" height="50" />'
            
            $scope.gridGrpOptions = { 
                data: 'data',
                // enablePaging: true,
                rowHeight: '50' ,
                // plugins: [layoutPlugin],
                columnDefs: [ 
                    {field:'thumbnail',
                     width: '50px',
                     displayName:'Thumb',
                     cellTemplate: $scope.imgTmplt},
                    {field:'title',
                     width: '100px',
                     displayName: 'Group'},
                    {field: 'owner',
                     width: '80px',
                     displayName: 'Owner'},
                    {field: 'id',
                     width: '80px',
                     displayName: 'Group ID'}
                ] 
            };
               // find groups based on input keyword
            $scope.findArcGISGroup = function(portalForSearch) {
              console.log('findArcGISGroup');
              var keyword = $scope.searchTermGrp;
              var params = {
                q:  keyword,
                num:20  //find 40 items - max is 100
               };
               portalForSearch.queryGroups(params).then(function (data) {
                $scope.showGroupResults(data);
               });
            }
            
            $scope.getGridStyle = function () {
                
                var vrbg = angular.element(document.getElementById("verbagePan"));
                var accHead = angular.element(document.getElementById("AccdianNews"));
                var srchWrap = angular.element(document.getElementById("searchToolWrapper"));
                var marginborder = (1 + 1) * 2;
                var accinnermarginborder = (1 + 9) * 2;
{'fraction_non_alphanumeric': 0.11481819366610192, 'fraction_numerical': 0.019158086797862635, 'mean_word_length': 1.1204752694114397, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '666782', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1833, 'n_words': 338}