]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Add window options button
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 29 Nov 2014 20:20:14 +0000 (21:20 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 29 Nov 2014 20:20:14 +0000 (21:20 +0100)
gui/baculum/protected/JavaScript/slide-window.js
gui/baculum/protected/Portlets/SlideWindow.tpl
gui/baculum/themes/Baculum-v1/gear-icon-alpha.png [new file with mode: 0644]
gui/baculum/themes/Baculum-v1/gear-icon.png [new file with mode: 0644]
gui/baculum/themes/Baculum-v1/style.css

index ed9857410e0876fb141e444f39b3172492dc486f..8ee993817290d62a50d957a5ca7ffeec995501ff 100644 (file)
@@ -7,6 +7,8 @@ var SlideWindowClass = Class.create({
        fullSizeEl : null,
        search: null,
        toolbar: null,
+       tools: null,
+       options: null,
        configurationObj: null,
        loadRequest : null,
        repeaterEl: null,
@@ -30,6 +32,7 @@ var SlideWindowClass = Class.create({
                contentItems : 'slide-window-element',
                contentAlternatingItems : 'slide-window-element-alternating',
                toolsButtonSuffix : '-slide-window-tools',
+               optionsButtonSuffix : '-slide-window-options',
                actionsSuffix : '-slide-window-actions',
                toolbarSuffix : '-slide-window-toolbar',
                titleSuffix : '-slide-window-title'
@@ -43,6 +46,7 @@ var SlideWindowClass = Class.create({
                this.windowId = windowId;
                this.window = $(this.windowId + this.elements.containerSuffix);
                this.tools = $(this.windowId + this.elements.toolsButtonSuffix);
+               this.options = $(this.windowId + this.elements.optionsButtonSuffix);
                
                if(data.hasOwnProperty('showId')) {
                                this.showEl = $(data.showId);
@@ -112,6 +116,10 @@ var SlideWindowClass = Class.create({
                this.tools.observe('click', function() {
                        this.toggleToolbar();
                }.bind(this));
+
+               this.options.observe('click', function() {
+                       this.toggleToolbar();
+               }.bind(this));
        },
        
        openWindow : function() {
index 01e06f7f92d7abf804b786e769022c4cd00f80da..aa0ca6b5a8d17668a3d992ea7fc657dd071bc502 100644 (file)
@@ -2,6 +2,7 @@
        <div id="<%=$this->getParent()->getID()%>-slide-window-progress" class="slide-window-progress"></div>
        <div class="slide-window-content">
                <com:TContentPlaceHolder ID="SlideWindowContent" />
+               <div id="<%=$this->getParent()->getID()%>-slide-window-options" class="slide-window-options"></div>
                <div id="<%=$this->getParent()->getID()%>-slide-window-toolbar" class="slide-window-toolbar" style="display: none">
                        <com:TImageButton ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/close.png" Style="margin: 5px 5px 0 0;float: right;" Attributes.onclick="SlideWindow.getObj('<%=$this->getParent()->getID()%>').toggleToolbar(); return false;" Attributes.alt="<%[ Close ]%>" ToolTip="<%[ Close ]%>" />
                        <table>
                                SlideWindow.getObj('<%=$this->getParent()->getID()%>').setLoadRequest();
                        </prop:ClientSide.OnComplete>
                </com:TCallback>
-                       <script type="text/javascript">
-                               <%=$this->getParent()->getID()%>_refresh_window_func = function() {
-                                               var request = <%= $this->DetailView->ActiveControl->Javascript %>;
-                                               request.dispatch();
-                                       }
-                               $$('input[id=<%=$this->Simple->ClientID%>], input[id=<%=$this->Details->ClientID%>], select[id=<%=$this->Limit->ClientID%>]').each(function(el) {
-                                       el.observe('change', <%=$this->getParent()->getID()%>_refresh_window_func);
-                               });
-                       </script>
+               <script type="text/javascript">
+                       <%=$this->getParent()->getID()%>_refresh_window_func = function() {
+                                       var request = <%= $this->DetailView->ActiveControl->Javascript %>;
+                                       request.dispatch();
+                               }
+                       $$('input[id=<%=$this->Simple->ClientID%>], input[id=<%=$this->Details->ClientID%>], select[id=<%=$this->Limit->ClientID%>]').each(function(el) {
+                               el.observe('change', <%=$this->getParent()->getID()%>_refresh_window_func);
+                       });
+               </script>
        </div>
 </div>
 <script type="text/javascript">
diff --git a/gui/baculum/themes/Baculum-v1/gear-icon-alpha.png b/gui/baculum/themes/Baculum-v1/gear-icon-alpha.png
new file mode 100644 (file)
index 0000000..421396f
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/gear-icon-alpha.png differ
diff --git a/gui/baculum/themes/Baculum-v1/gear-icon.png b/gui/baculum/themes/Baculum-v1/gear-icon.png
new file mode 100644 (file)
index 0000000..7d7ee8b
Binary files /dev/null and b/gui/baculum/themes/Baculum-v1/gear-icon.png differ
index bd134bb68b4380dc260c34a6f9039ac306623093..326e3008f448a3445af9c7bd0f593dc2c850ba2e 100644 (file)
@@ -549,7 +549,23 @@ div.configuration-window-content {
        padding: 10px 12px;;
 }
 
+div.slide-window-options {
+       height: 36px;
+       width: 36px;
+       z-index: 20;
+       position: absolute;
+       margin: 0;
+       padding: 0;
+       bottom: 0;
+       right: 0;
+       border: 0;
+       background: transparent url('gear-icon-alpha.png') no-repeat left 0;
+}
 
+div.slide-window-options:hover {
+       cursor: pointer;
+       background: transparent url('gear-icon.png') no-repeat left 0;
+}
 div.status-bar-append, div.status-bar-full, div.status-bar-used, div.status-bar-error, div.status-bar-purged, div.status-bar-recycle, div.status-bar-busy, div.status-bar-disabled, div.status-bar-archive, div.status-bar-cleaning, div.status-bar-read-only, div.status-bar-detail-append, div.status-bar-detail-full, div.status-bar-detail-used, div.status-bar-detail-error, div.status-bar-detail-purged, div.status-bar-detail-recycle, div.status-bar-detail-busy, div.status-bar-detail-disabled, div.status-bar-detail-archive, div.status-bar-detail-cleaning, div.status-bar-detail-read-only {
        position: relative;
        border: 1px solid black;