PageSourceSearch

https://airinfotech.in/components/index/remark/index.remark.controller.js

js airinfotech.in collected 2026-10-09 04:08:10 UTC 4,276 bytes, 114 lines download raw bytes

1(function () {
2    'use strict';
3
4    angular.module("airWebapp.indexSearch.remark")
5            .controller("RemarkController", RemarkController);
6
7    RemarkController.$inject = ["airPageTitle", "$location", "$window", "$scope", "defaultIndexParams", "airUtils", "IndexService", "ViewBothService"];
8
9    function RemarkController(airPageTitle, $location, $window, $scope, defaultIndexParams, airUtils, IndexService, ViewBothService) {
10        airPageTitle.title = "Remark index search";
11        var _this = this;
12        this.$location = $location;
13        this.IndexService = IndexService;
14        this.ViewBothService = ViewBothService;
15        this.type = "remark";
16        this.remarks = [];
17        this.selectedRemark = {};
18        this.remarkData = {};
19        this.selectedCitations = {};
20        this.$scope = $scope;
21        this.searchParams = angular.copy(defaultIndexParams);
22        this.formOptions = {};
23        this.formOptions.journals = airUtils.getUserJournals();
24        $(".searchaffectinginput").hide();
25        $scope.HighlightRow = function (section) {
26        $scope.selected = section;
27        };
28         localStorage.setItem("pagenewsearch",false);
29
30        $scope.isSelected = function (section) {
31            return $scope.selected === section;
32        };
33        this.curState = {
34            page: 1,
35            totalItems: 0,
36          //  searchText: '',
37          //  affectedtext:'',
38        };
39        IndexService.getRemarkList().then(function (data) {
40            _this.remarks = data.remarks[0];
41        }, function () {
42            console.log("error getting remark list");
43        });
44
45        this.viewBoth = function (affectingId, affectedId) {
46            ViewBothService.getFullView(affectingId, affectedId);
47            $location.path("/viewboth");
48
49        }
50    }
51
52    RemarkController.prototype.curMax = function () {
53        var max = ((this.curState.page - 1) * this.searchParams.limit) + this.searchParams.limit;
54        return (max < this.curState.totalItems) ? max : this.curState.totalItems;
55    };
56
57    RemarkController.prototype.selectRemark = function (remark ,resetoption) { 
58        $(".searchaffectinginput").show();
59        if(resetoption == "resetoption"){
60            this.searchParams.remark = remark;
61            this.curState.searchText = "";
62    }
63        else{
64        this.searchParams.remark = remark.key;  
65    }
66        this.searchParams.offset = 0;
67        this.getRemarkCitations();
68    };
69
70    RemarkController.prototype.getRemarkCitations = function () {
71        var _this = this;
72        this.IndexService.getRemarkCitations(this.searchParams).then(function (data) {
73            _this.curState.totalItems = data.count;
74            _this.remarkData = data;
75        }, function () {
76            console.log("error getting remark cases");
77        });
78    };
79
80    RemarkController.prototype.pageChanged = function () {
81        this.searchParams.offset = (this.curState.page - 1) * this.searchParams.limit;
82        this.getRemarkCitations();
83    };
84
85    RemarkController.prototype.getCaseLink = function (caseId) {
86        return "cases?case=" + caseId;
87    };
88
89     RemarkController.prototype.searchKeywordRemark = function () { 
90
91                 var _this = this;
92                 this.searchParams.remark =  this.searchParams.remark;
93                 
94                this.IndexService.searchKeywordRemark(this.searchParams.remark,_this.searchParams.limit, _this.searchParams.offset, _this.curState.searchText,_this.curState.affectedtext).then(function (data) {
95//                _this.flairtalkData = result;
96                if (data.err_code == 'success') {
97                    _this.curState.totalItems = data.count;
98                    _this.remarkData = data;
99                }
100                console.log(data);
101//                this.getRemarkCitations();
102            }, function (result) {
103                console.log("error fetching queries data: " + result);
104            });
105        }
106        
107//             RemarkController.prototype.resetSearchRemark = function () { 
108//                 var _this = this;
109//                 this.searchParams.remark =  this.searchParams.remark;
110//                 this.selectRemark(this.searchParams.remark);
111//                 
112//        }
113
114})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.