Merge branch 'devel' of https://github.com/pi-hole/AdminLTE into advancedstats

Conflicts:
	footer.php
This commit is contained in:
Brice Johnson
2016-02-13 12:17:45 -06:00
5 changed files with 22 additions and 23 deletions
+9
View File
@@ -0,0 +1,9 @@
This is a basic checklist for now, We will update it in the future.
* Fork the repo and create your new branch based on the `devel` (development) branch.
* Use 4 spaces instead of tabs
* Commit Unix line endings
* If you want, try to keep to the theme of black holes/gravity. This can add some fun to your submission.
* Submit Pull Requests to the development branch only.
* Before Submitting your Pull Request, merge `devel` with your new branch and fix any conflicts. (Make sure you don't break anything in development!)
* Be patient. We will review all submitted pull requests, but our focus is on stability.. please don't be offended if we reject your PR, or it appears we're doing nothing with it! We'll get around to it..
-13
View File
@@ -19,16 +19,3 @@ A basic read-only API can be accessed at `/admin/api.php`. It returns the follow
"ads_percentage_today": 80.892423238348
}
```
## Contributing
If you would like to add to the project, please make sure to follow these guidelines:
1. Branch off of ```devel``` into your own feature branch (ex. ```feature```).
2. When you are finished, make a pull request to merge your ```feature``` branch into ```devel```.
Keep these things in mind:
* Use 4 spaces instead of tabs
* Commit Unix line endings
* If you want, try to keep to the theme of black holes/gravity. This can add some fun to your submission.
+4 -2
View File
@@ -4,13 +4,15 @@
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Pi-hole Version</b> 2.2
<b>Pi-hole Version </b> <?php echo exec("cd /etc/.pihole/ && git describe --tags --abbrev=0"); ?>
<b>Web Interface Version </b> <?php echo exec("cd /var/www/html/admin/ && git describe --tags --abbrev=0"); ?>
</div>
<i class="fa fa-github"></i> <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=3J2L3Z4DHW9UY">Donate</a></strong> if you found this useful.
</footer>
</div>
<!-- ./wrapper -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" type="text/javascript"></script>
<script src="./js/app.min.js" type="text/javascript"></script>
+1 -1
View File
@@ -179,7 +179,7 @@
<!-- /.row -->
<?php
require "footer.html";
require "footer.php";
?>
<script type="text/javascript">
+8 -7
View File
@@ -31,7 +31,7 @@ function getFullName() {
Adding to the <?php getFullName(); ?>...
</div>
<div id="alSuccess" class="alert alert-success" role="alert" hidden="true">
Success! It will probably take 2-10 minutes until the changes take effect. The list will refresh.
Success! The list will refresh.
</div>
<div id="alFailure" class="alert alert-danger" role="alert" hidden="true">
Failure! Something went wrong.
@@ -41,7 +41,7 @@ function getFullName() {
<ul class="list-group" id="list"></ul>
<?php
require "footer.html";
require "footer.php";
?>
<script>
@@ -62,10 +62,10 @@ require "footer.html";
'<div class="alert alert-info" role="alert">Your <?php getFullName(); ?> is empty!</div>';
}
else {
data.forEach(function (entry) {
data.forEach(function (entry, index) {
list.innerHTML +=
'<li id="' + entry + '" class="list-group-item clearfix">' + entry +
'<button class="btn btn-danger btn-xs pull-right" type="button" onclick="sub(\'' + entry + '\')">' +
'<li id="' + index + '" class="list-group-item clearfix">' + entry +
'<button class="btn btn-danger btn-xs pull-right" type="button" onclick="sub(\'' + index + '\', \'' + entry + '\')">' +
'<span class="glyphicon glyphicon-trash"></span></button></li>';
})
}
@@ -98,13 +98,14 @@ require "footer.html";
});
}
function sub(entry) {
function sub(index, entry) {
$("#"+index).hide("highlight");
$.ajax({
url: "php/sub.php",
method: "get",
data: {"domain":entry, "list":"<?php echo $list ?>"},
success: function(response) {
document.getElementById("list").removeChild(document.getElementById(entry));
document.getElementById("list").removeChild(document.getElementById(index));
},
error: function(jqXHR, exception) {
alert("Failed to remove the domain!");