Lines Matching refs:scope
15 scope: { // The attributes below are bound to the scope
20 link: function(scope, elm, attrs, ctrl) {
25 scope.render = function() {
27 if (scope.side == "left") {
50 if (scope.side == "left") {
51 scope.render();
60 if (scope.side == "right") {
61 scope.render();
67 scope.swap = function() {
68 if (scope.side == "left") {
69 scope.side = "right";
71 scope.side = "left";
73 scope.render();
79 function DiffListController($scope, $http, $location, $timeout, $parse) {
82 $scope.isDynamic = ($location.protocol() == "http" || $location.protocol() == "https");
85 $scope.differs = [
94 // Puts the records within AngularJS scope
95 $scope.records = SkPDiffRecords.records;
99 $scope.lastSelectedIndex = undefined;
102 $scope.sortIndex = 1;
105 $scope.setSortIndex = function(idx) {
106 $scope.sortIndex = idx;
110 $scope.lastSelectedIndex = undefined;
114 $scope.sortingDiffer = function(record) {
115 return record.diffs[$scope.sortIndex].result;
120 $scope.flashStatus = function(success) {
126 $scope.statusClass = flashStyle;
130 $scope.statusClass = "";
134 $scope.selectedRebaseline = function(index, event) {
136 var recordsInOrder = $parse("records | orderBy:sortingDiffer")($scope);
140 if (event.shiftKey && $scope.lastSelectedIndex !== undefined) {
142 var smallerIndex = Math.min($scope.lastSelectedIndex, index);
143 var largerIndex = Math.max($scope.lastSelectedIndex, index);
147 $scope.lastSelectedIndex = index;
151 $scope.lastSelectedIndex = index;
156 $scope.commitRebaselines = function() {
159 for (var recordIndex = 0; recordIndex < $scope.records.length; recordIndex++) {
160 if ($scope.records[recordIndex].isRebaselined) {
161 rebaselines.push($scope.records[recordIndex].testPath);
167 $scope.flashStatus(data.success);
169 $scope.flashStatus(false);