]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Resize windows on double click event
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 4 Apr 2015 03:37:03 +0000 (05:37 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 4 Apr 2015 03:37:03 +0000 (05:37 +0200)
gui/baculum/protected/JavaScript/slide-window.js
gui/baculum/themes/Baculum-v1/style.css

index 44e1545828edb2763780a1c36a04ffa4f4bbffd8..36303a3d34dc1aaa91aeef2226c42c1231a636df 100644 (file)
@@ -8,6 +8,7 @@ var SlideWindowClass = Class.create({
        search: null,
        toolbar: null,
        tools: null,
+       titlebar: null,
        options: null,
        configurationObj: null,
        loadRequest : null,
@@ -49,6 +50,7 @@ var SlideWindowClass = Class.create({
                this.window = $(this.windowId + this.elements.containerSuffix);
                this.tools = $(this.windowId + this.elements.toolsButtonSuffix);
                this.options = $(this.windowId + this.elements.optionsButtonSuffix);
+               this.titlebar = $(this.windowId + this.elements.titleSuffix);
 
                if(data.hasOwnProperty('showId')) {
                                this.showEl = $(data.showId);
@@ -111,6 +113,10 @@ var SlideWindowClass = Class.create({
                        this.resetSize();
                }.bind(this));
 
+               this.titlebar.observe('dblclick', function() {
+                       this.resetSize();
+               }.bind(this));
+
                this.search.observe('keyup', function(){
                        this.setSearch();
                }.bind(this));
@@ -315,7 +321,6 @@ var SlideWindowClass = Class.create({
                        }.bind(search_pattern));
        },
        setElementsCount : function() {
-               var title_el = $(this.windowId + this.elements.titleSuffix);
                var elements_count = $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] div.' + this.elements.contentItems).length || $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentItems + ', div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentAlternatingItems).length;
                var count_el = $(this.windowId + this.elements.titleSuffix).getElementsByTagName('span')[0];
                $(count_el).update(' (' + elements_count + ')');
index af7f60e3cc082f96ffa507e97b6185021ebcd1f4..e26a85866359a4f2cec4026aa40cda2103251434 100644 (file)
@@ -521,6 +521,12 @@ div.slide-window-bar-title {
        height: 14px;
        margin-right: 51px;
        padding: 0;
+       -webkit-touch-callout: none;
+       -webkit-user-select: none;
+       -khtml-user-select: none;
+       -moz-user-select: none;
+       -ms-user-select: none;
+       user-select: none;
 }
 
 div.slide-window-close, div.slide-window-fullsize, div.slide-window-sort {