diff --git a/app/views/admin/footer.html b/app/views/admin/footer.html
index 6522874..a8b9e28 100644
--- a/app/views/admin/footer.html
+++ b/app/views/admin/footer.html
@@ -11,20 +11,3 @@
-
\ No newline at end of file
diff --git a/public/admin/js/admin.js b/public/admin/js/admin.js
index 0c28c87..517adeb 100644
--- a/public/admin/js/admin.js
+++ b/public/admin/js/admin.js
@@ -274,21 +274,56 @@ function goNowToDatetime(goNow) {
!function ($) {
$(function(){
- // life
- $(".nav li > a").click(function(e) {
- $p = $(this).closest("ul");
- var $li = $(this).closest("li");
- if($li.find("ul").length == 0) {
- return true;
- }
- e.preventDefault();
- var hasClass = $li.hasClass("active");
- $p.find("li").removeClass("active");
- if(hasClass) {
- } else {
- $li.addClass("active");
- }
- });
+ //navigation
+ !function ($) {
+ /**
+ * description
+ * every href must begin with "?t="
+ */
+ //initial
+ function getParameterByName(name, queryString) {
+ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); //address array [] condiion
+ var regex = new RegExp("[\\?&]" + name + "=([^]*)"),
+ results = regex.exec(queryString);
+ return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
+ }
+
+ var pathname = window.location.pathname; // admin/t
+ var search = window.location.search; // ?t=xxx
+ var fullPath = pathname;
+
+ //test case
+ //http://localhost:9000/admin/t?p=0&t=email/sendToUsers
+ //t=email/sendToUsers and t=email/send
+ var paramId = getParameterByName("t",window.location.search)
+ if(paramId !== "") {
+ var fullPath = pathname + "?t=" + paramId; // /admin/t?t=xxx
+ }
+
+ $("#nav > li").removeClass("active");
+
+ var $thisLi = $('#nav a[href="' + fullPath + '"]').parent();
+ // 自己
+ $thisLi.addClass("active");
+ // 父也active
+ $thisLi.parent().parent().addClass('active');
+
+ // event binding
+ $(".nav li > a").click(function(e) {
+ $p = $(this).closest("ul");
+ var $li = $(this).closest("li");
+ if($li.find("ul").length == 0) {
+ return true;
+ }
+ e.preventDefault();
+ var hasClass = $li.hasClass("active");
+ $p.find("li").removeClass("active");
+ if(hasClass) {
+ } else {
+ $li.addClass("active");
+ }
+ });
+ }($);
// sort
$(".th-sortable").click(function() {
@@ -566,4 +601,4 @@ function goNowToDatetime(goNow) {
});
-}(window.jQuery);
\ No newline at end of file
+}(window.jQuery);
diff --git a/app/test/TestNoteService.go b/tests/TestNoteService.go
similarity index 100%
rename from app/test/TestNoteService.go
rename to tests/TestNoteService.go