From 6c91d0ee9814f7b848e0bf79478dcae1bbe2d5f8 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 4 Apr 2015 05:37:03 +0200 Subject: [PATCH] baculum: Resize windows on double click event --- gui/baculum/protected/JavaScript/slide-window.js | 7 ++++++- gui/baculum/themes/Baculum-v1/style.css | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gui/baculum/protected/JavaScript/slide-window.js b/gui/baculum/protected/JavaScript/slide-window.js index 44e1545828..36303a3d34 100644 --- a/gui/baculum/protected/JavaScript/slide-window.js +++ b/gui/baculum/protected/JavaScript/slide-window.js @@ -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 + ')'); diff --git a/gui/baculum/themes/Baculum-v1/style.css b/gui/baculum/themes/Baculum-v1/style.css index af7f60e3cc..e26a858663 100644 --- a/gui/baculum/themes/Baculum-v1/style.css +++ b/gui/baculum/themes/Baculum-v1/style.css @@ -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 { -- 2.39.5