Commit 1d84b09c authored by Nick Poulden's avatar Nick Poulden
Browse files

History and Favorite bug fixes and styling

parent 2159c47c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -71,9 +71,9 @@ Ext.define("Docs.History", {
        if (cls) {
            // When class already in history remove it and add again.
            // This way the most recently visited items will always be at the top.
            var oldIndex = this.store.find('cls', cls);
            if (oldIndex) {
                this.store.removeAt(oldIndex);
            var oldItem = this.store.findRecord('cls', cls);
            if (oldItem) {
                this.store.remove(oldItem);
            }

            // Add new item at the beginning
+8 −2
Original line number Diff line number Diff line
@@ -168,8 +168,14 @@ Ext.define('Docs.controller.Classes', {

        if (clsName) {
            if (e.getTarget(".fav")) {
                var favEl = Ext.get(e.getTarget(".fav"));
                if (favEl.hasCls('show')) {
                    Docs.Favorites.remove(clsName);
                    favEl.removeCls("show");                    
                } else {                    
                    Docs.Favorites.add(clsName);
                Ext.get(e.getTarget(".fav")).addCls("show");
                    favEl.addCls("show");
                }
            }
            else {
                this.loadClass(clsName);
+2 −1
Original line number Diff line number Diff line
@@ -52,7 +52,8 @@ Ext.define('Docs.view.tree.Favorites', {

        var p = this.getEl().getXY();
        this.hoverMenu.getEl().setStyle({
            left: "35px",
            left: "20px",
            width: "220px",
            top: (p[1]+23)+"px"
        });
    },
+2 −1
Original line number Diff line number Diff line
@@ -52,7 +52,8 @@ Ext.define('Docs.view.tree.History', {

        var p = this.getEl().getXY();
        this.hoverMenu.getEl().setStyle({
            left: "35px",
            left: "20px",
            width: "220px",
            top: (p[1]+23)+"px"
        });
    },
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
  <script type="text/javascript" src="prettify/prettify.js"></script>

  <script type="text/javascript" src="app.js"></script>
  <script type="text/javascript" src="app/Favorites.js"></script>
  <script type="text/javascript" src="app/History.js"></script>

  <script type="text/javascript" src="output/tree.js"></script>
Loading