]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Miscellaneous improvements to use restore file browsers on different screen...
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 21 Jul 2019 18:36:17 +0000 (20:36 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:55:26 +0000 (15:55 +0100)
Also small corrections to English texts in restore wizard

gui/baculum/protected/Web/Lang/en/messages.mo
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.mo
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.mo
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.mo
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Pages/RestoreWizard.page
gui/baculum/themes/Baculum-v2/css/restore-wizard.css
gui/baculum/themes/Baculum-v2/loader-small.gif [new file with mode: 0644]

index ef6051fe74b2163f4c28a19298f51044dee0565e..d01ba02ad0a7ef6948989ff83b20d85a2f565587 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ
index e4e63ada483dd25a2d6334450dd93653823e20d5..4d54659c5c158b9891fcfac58ea5550924e4c9f4 100644 (file)
@@ -461,11 +461,11 @@ msgstr "Step 3 - select files to restore"
 msgid "Files"
 msgstr "Files"
 
-msgid "For see a file versions please click file on the left files browser."
-msgstr "For see a file versions please click file on the left files browser."
+msgid "To see file versions please click a file on the left files browser."
+msgstr "To see file versions please click a file on the left files browser."
 
-msgid "For add a file to restore please click 'Add' link or drag a file from frame on left or from above frame and drop it here"
-msgstr "For add a file to restore please click 'Add' link or drag a file from frame on left or from above frame and drop it here"
+msgid "To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left."
+msgstr "To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left."
 
 msgid "It seems that there is no files for choosing or file records in database for this job has been purged (file retention period expired)"
 msgstr "It seems that there is no files for choosing or file records in database for this job has been purged (file retention period expired)"
index 778cbace032310c4cfd3a8a36d80cc77feb771f7..9f6e69899a18cd9ed2ab531ed4b0938d7b16169a 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ
index 2e698858e6be2e33a61049f27f4299ef945cc27d..4b766c989e8f561ade6130758b7a2ea84a5ac93a 100644 (file)
@@ -576,12 +576,8 @@ msgstr "Finished jobs:"
 msgid "First written"
 msgstr "First written"
 
-msgid ""
-"For add a file to restore please click 'Add' link or drag a file from frame "
-"on left or from above frame and drop it here"
-msgstr ""
-"左のフレームから追加をクリックするか「ここ」にファイルをドラック& "
-"ドロップしてリストア対象のファイルを追加してください"
+msgid "To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left."
+msgstr "左のフレームから追加をクリックするか「ここ」にファイルをドラック& ドロップしてリストア対象のファイルを追加してください"
 
 msgid ""
 "For need defining more Baculum users with custom access or restricted "
@@ -592,7 +588,7 @@ msgstr ""
 "console access (Bconsole ACLs) here is possible to determine custom bconsole "
 "configuration file format for each user."
 
-msgid "For see a file versions please click file on the left files browser."
+msgid "To see file versions please click a file on the left files browser."
 msgstr "ファイルのバージョンチェックをするには左のフレームのファイルをクリックしてください"
 
 msgid "From day"
index 2cd248262965cd7997bcf8452af35ab5d2de58dd..20e800cdc7f7ec1fe43627f9d5a6fe553d4755fe 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ
index d7b1b50884f3d8932a7c42b9148e28e0d4a0b92b..dea64a55b92e60d28539b09ea4981bf915997592 100644 (file)
@@ -410,10 +410,10 @@ msgstr "Uruchom"
 msgid "It seems that there is no files for choosing or file records in database for this job has been purged (file retention period expired)"
 msgstr "Wygląda na to, że nie ma żadnych plików do przywrócenia lub rekordy plików w bazie danych dla tego wybranego backupu zostały wyczyszczone (miała zastosowanie retencja plików)"
 
-msgid "For see a file versions please click file on the left files browser."
+msgid "To see file versions please click a file on the left files browser."
 msgstr "Aby zobaczyć wersje pliku proszę klinąć plik z przeglądarki plików po lewej stronie."
 
-msgid "For add a file to restore please click 'Add' link or drag a file from frame on left or from above frame and drop it here"
+msgid "To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left."
 msgstr "Aby dodać plik do przywrócenia proszę kliknąć link 'Dodaj' lub złapać plik z panelu po lewej lub z panelu powyżej, przeciągnąć go tutaj i upuścić go"
 
 msgid "Source parameters"
index 330728d8262f03093c4db52830f4174121efc291..e26873292c86070f412fcf87a25c2d4a1b1e7d5e 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ
index 54f30f0af598663912be0b84982591b606305aa3..de8cd8bc19f9c74005fcd971adbb11358fa6d990 100644 (file)
@@ -465,10 +465,10 @@ msgstr "Etapa 3 - Selecione os arquivos para restaurar"
 msgid "Files"
 msgstr "Arquivos"
 
-msgid "For see a file versions please click file on the left files browser."
+msgid "To see file versions please click a file on the left files browser."
 msgstr "Para verificar as versões disponíveis dos arquivos, clique no menu à esquerda no arquivo desejado."
 
-msgid "For add a file to restore please click 'Add' link or drag a file from frame on left or from above frame and drop it here"
+msgid "To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left."
 msgstr "Para adicionar um arquivo para restauração clique no link 'Adicionar' ou arraste e solte o arquivo do menu à esquerda neste quadro"
 
 msgid "It seems that there is no files for choosing or file records in database for this job has been purged (file retention period expired)"
index 63b3a55f4c7155db7ebb989aa6ee3cc2e002ca42..ca2f27d96333f03c792cc9dde464692d665f2703 100644 (file)
@@ -335,6 +335,7 @@ oJobsToRestoreList.init();
                                                </prop:ClientSide.OnLoading>
                                                <prop:ClientSide.OnComplete>
                                                        document.getElementById('restore-browser-files-loading').style.display = 'none';
+                                                       make_draggable('<%=$this->getPage()->DataGridFiles->ClientID%>');
                                                </prop:ClientSide.OnComplete>
                                                <i class="fa fa-check"></i> &nbsp;<%[ OK ]%>
                                        </com:TActiveLinkButton>
@@ -342,7 +343,7 @@ oJobsToRestoreList.init();
                        </div>
                        <table id="restore-browser">
                                <tr>
-                                       <td rowspan="2">
+                                       <td rowspan="2" style="height: 100%">
                                                <div id="restore-browser-files-loading" style="display: none"></div>
                                                <div id="restore-browser-files" class="w3-border">
                                                <com:TActiveDataGrid
@@ -355,7 +356,7 @@ oJobsToRestoreList.init();
                                                        DataKeyField="fileid"
                                                        >
                                                                <prop:EmptyTemplate>
-                                                                       <div class="file-browser-watermark" style="padding: 200px 10px">
+                                                                       <div class="file-browser-watermark">
                                                                                <%[ It seems that there is no files for choosing or file records in database for this job has been purged (file retention period expired) ]%>
                                                                        </div>
                                                                </prop:EmptyTemplate>
@@ -414,7 +415,7 @@ oJobsToRestoreList.init();
                                                </com:TCallback>
                                                </div>
                                        </td>
-                                       <td>
+                                       <td style="height: 50%">
                                                <div id="restore-browser-versions" class="w3-border" style="position: relative">
                                                        <com:TActiveDataGrid
                                                                ID="VersionsDataGrid"
@@ -427,7 +428,7 @@ oJobsToRestoreList.init();
                                                        >
                                                                <prop:EmptyTemplate>
                                                                        <div class="file-browser-watermark">
-                                                                               <%[ For see a file versions please click file on the left files browser. ]%>
+                                                                               <%[ To see file versions please click a file on the left files browser. ]%>
                                                                        </div>
                                                                </prop:EmptyTemplate>
                                                                <com:TActiveTemplateColumn>
@@ -472,7 +473,7 @@ oJobsToRestoreList.init();
                                        </td>
                                </tr>
                                <tr>
-                                       <td style="vertical-align: bottom;">
+                                       <td style="height: 50%; vertical-align: bottom;">
                                                <div id="restore-browser-selected" class="w3-border">
                                                        <com:TCallback
                                                                ID="RemoveSelectedItem"
@@ -501,8 +502,8 @@ oJobsToRestoreList.init();
                                                                                DataKeyField="fileid"
                                                                        >
                                                                        <prop:EmptyTemplate>
-                                                                               <div class="file-browser-watermark" style="padding: 50px 10px">
-                                                                                       <%[ For add a file to restore please click 'Add' link or drag a file from frame on left or from above frame and drop it here ]%>
+                                                                               <div class="file-browser-watermark">
+                                                                                       <%[ To add a file to restore please click 'Add' link or please drag here the file from the top frame or from the frame on the left. ]%>
                                                                                </div>
                                                                        </prop:EmptyTemplate>
                                                                        <com:TActiveTemplateColumn>
@@ -542,9 +543,25 @@ oJobsToRestoreList.init();
                                </div>
                        </div>
                        <script type="text/javascript">
-                               var browser = document.getElementById('restore-browser-files');
-                               document.getElementById('restore-browser-files-loading').style.width = browser.offsetWidth + 'px';
-                               document.getElementById('restore-browser-files-loading').style.height = browser.offsetHeight + 'px';
+                               function set_browser_sizes() {
+                                       var win_height = $(window).height();
+                                       // 70 - bottom bar, 234 - top bar, 40 - path field
+                                       var h = win_height - 70 - 234 - 40;
+                                       if (h < 220) {
+                                               h = 220; // minimal fs browser height
+                                       }
+                                       var comp_rb_height = h.toString() + 'px';
+                                       var rb = document.getElementById('restore-browser');
+                                       rb.style.height = comp_rb_height;
+
+                                       // workaround for setting proper browser height on Firefox
+                                       $(rb).find('tbody')[0].style.height = comp_rb_height;
+
+                                       var rb_files = document.getElementById('restore-browser-files');
+                                       var rb_load = document.getElementById('restore-browser-files-loading');
+                                       rb_load.style.width = rb_files.offsetWidth + 'px';
+                                       rb_load.style.height = rb_files.offsetHeight + 'px';
+                               }
                                function show_invalid_path_to_restore() {
                                        document.getElementById('invalid_path_to_restore_modal').style.display = 'block';
                                }
@@ -556,6 +573,10 @@ oJobsToRestoreList.init();
                                                'containment':"window"
                                        });
                                }
+                               $(window).resize(function() {
+                                       set_browser_sizes();
+                               });
+                               set_browser_sizes();
                                make_draggable('<%=$this->getPage()->DataGridFiles->ClientID%>');
                                Formatters.set_formatters();
                        </script>
index e40d33d759d7441b3ef672d2b0f6890673ff0b95..f4d55f5734b3db569bee5a7f35795541d660c36b 100644 (file)
@@ -1,39 +1,24 @@
 #restore-browser {
        width: 100%;
-       height: 100%;
 }
 
 #restore-browser td {
        width: 45%;
 }
 
-#restore-browser-files {
-       height: 364px;
-}
-
 #restore-browser-files, #restore-browser-versions, #restore-browser-selected {
        overflow: auto;
        width: 100%;
+       height: 100% !important;
        background-color: white;
        padding: 0 4px;
-       -moz-user-select: -moz-none;
-       -webkit-user-select: none;
-       -ms-user-select: none;
-}
-
-#restore-browser-versions {
-       height: 180px;
-}
-
-#restore-browser-selected {
-       height: 180px;
 }
 
 #restore-browser-files-loading {
        position: absolute;
        z-index: 10;
        height: 100%;
-       background: rgba(182,182,182,0.4) url('progress.gif') no-repeat center center;
+       background: rgba(182,182,182,0.4) url('/themes/Baculum-v2/loader-small.gif') no-repeat center center;
 }
 
 .file-browser-detail {
@@ -76,3 +61,10 @@ tr.file-browser-element:hover {
 .bold {
        font-weight: bold;
 }
+
+/* Overwrite jQuery-UI draggable class to solve problem with
+ * scrolling file list on mobile devices
+ */
+.ui-draggable-handle {
+    touch-action: auto !important;
+}
diff --git a/gui/baculum/themes/Baculum-v2/loader-small.gif b/gui/baculum/themes/Baculum-v2/loader-small.gif
new file mode 100644 (file)
index 0000000..c69e937
Binary files /dev/null and b/gui/baculum/themes/Baculum-v2/loader-small.gif differ