-
Notifications
You must be signed in to change notification settings - Fork 157
/
popup.html
59 lines (57 loc) · 2.6 KB
/
popup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE HTML>
<html ng-app="reres">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/popup.css"/>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body ng-controller="mapListCtrl">
<div class="container">
<div class="btnBox">
<button tabIndex="-1" class="btn btn-primary btn-xs" ng-click="addRule()">添加规则</button>
<a href="options.html" target="_blank" tabIndex="-1" class="btn btn-primary btn-xs">管理规则</a>
<a href="https://github.com/hanan198501/ReRes" target="_blank" tabIndex="-1" class="btn btn-primary btn-xs">Github</a>
<a href="http://cssha.com/reres" target="_blank" tabIndex="-1" class="btn btn-primary btn-xs">使用帮助</a>
</div>
<div style="display:{{editDisplay}};" class="editBox">
<button type="button" class="close" aria-hidden="true" ng-click="hideEditBox()">×</button>
<div class="errorMsg">{{inputError}}</div>
<div class="form-group">
<label for="req">If URL match:</label>
<input type="text" class="form-control" id="req" ng-model="curRule.req"/>
</div>
<div class="form-group">
<label for="res">Response:</label>
<input type="text" class="form-control" id="res" ng-model="curRule.res"/>
</div>
<div class="form-group">
<label for="res">Group:</label>
<input type="text" class="form-control" id="group" ng-model="curRule.group"/>
</div>
<!--<div class="form-group">
<label for="type">Type:</label>
<select ng-model="curRule.type" class="form-control" id="type">
<option value="file">URL映射</option>
<option value="dir">目录映射</option>
</select>
</div>-->
<button class="btn-block btn btn-primary" ng-click="saveRule()">保存</button>
</div>
<div ng-repeat="(group, rulesMap) in rules track by $index">
<h5 style="text-align: center;font-weight: bold;">[{{group || group === unidefined || '未命名'}}]</h5>
<table class="table table-hover">
<tr ng-repeat="rule in rulesMap track by $index">
<td>
<label title="Responese: {{rule.res}}"><input type="checkbox" ng-model="rule.checked"/> {{rule.req}}</label>
<button ng-click="edit(rule)" type="button" class="btn btn-primary btn-xs edit">编辑</button>
<button ng-click="removeUrl(rule)" type="button" class="btn btn-default btn-xs remove">删除</button>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>