Commit 60462f07 authored by Nick Poulden's avatar Nick Poulden
Browse files

More history dropdown implementation

parent fb2ba558
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
Ext.define('Docs.view.clsTree.History', {
    	
	extend: 'Ext.button.Button',
	extend: 'Ext.Component',
	alias: 'widget.docshistorybutton',
	id: 'historyBtn',

	text: 'History',
	id: 'historyBtn',
	html: '<span></span>History',
		
	afterRender: function() {
	    
        this.on({
        this.callParent(arguments);

        this.getEl().on({
            mouseover: function() {
                
                if (!this.hoverMenu) {
@@ -37,8 +39,14 @@ Ext.define('Docs.view.clsTree.History', {
                clearTimeout(this.hideTimeout);
            },
            mouseout: this.deferHideMenu,
            click: function() {
            click: function(e) {
                console.log(arguments)
                if (e.getTarget(".close")) {                    
                    console.log("Close");
                } else {
                    this.hoverMenu.hide();                    
                }
                e.preventDefault();
            },
            scope: this
        });
+4 −1
Original line number Diff line number Diff line
@@ -9,7 +9,10 @@ Ext.define('Docs.view.clsTree.HistoryItems', {
    
    tpl: new Ext.XTemplate(
        '<tpl for=".">',
            '<div class="item">',
                '<a href="{cls}" rel="{cls}" class="docClass">{cls}</a>',
                '<a class="close" href="#" rel="{cls}">x</a>',
            '</div>',
        '</tpl>'
    )
});
+24 −1
Original line number Diff line number Diff line
@@ -635,8 +635,31 @@ a:hover {
      color: #083772;
      text-decoration: underline; } }
  td {
    vertical-align: top; } }
    vertical-align: top; } 
  span {
	position: absolute;
	right: 0; }}

.hover-menu-menu.show {
	display: block;
	.item {
		position: relative;
	    padding: 2px 30px 2px 0;
	}
	a {
	  display: inline;
		padding: 0;
	}
	a.close {
	  position: absolute; right: 0;
	}
}

#historyBtn {
  padding-left: 22px;
}
#historyBtn span {
	display: block; width: 17px; height: 17px; 
	position: absolute; left: 0; top: -2px;
	background: url(../images/favorite.png) no-repeat -36px 0;
}
 No newline at end of file