Bläddra i källkod

Added wip sidebar

Toby Chui 2 år sedan
förälder
incheckning
f6f40f1e73

+ 7 - 0
web/SystemAO/file_system/file_explorer.css

@@ -256,6 +256,7 @@ body{
     background-color:#f5f5f5;
     color:rgb(44, 44, 44);
     width: 250px;
+    min-width: 250px;
 }
 
 
@@ -485,6 +486,12 @@ body{
 
 #propertiesView{
     width: 300px;
+    min-width: 300px;
+    padding: 1em;
+}
+
+#propertiesView iframe{
+    height: 100%;
 }
 
 

+ 17 - 2
web/SystemAO/file_system/file_explorer.html

@@ -68,6 +68,8 @@
                     <button class="ui icon tiny button basic videmode" mode="grid" title="Block View" onclick="changeViewMode(this);"><i class="block layout icon"></i></button>
                     <button class="ui icon tiny button basic videmode" mode="list" title="List View" onclick="changeViewMode(this);"><i class="align justify icon"></i></button>
                     <button class="ui icon tiny button basic videmode" mode="details" title="Detail View" onclick="changeViewMode(this);"><i class="list ul icon"></i></button>
+                    <div class="fileoprGroupDivider" style="display: inline-block; height: 30px; vertical-align: bottom; margin-left: -0.2em; padding-right: 0.4em;"></div>
+                    <button class="ui icon tiny button basic videmode" title="Show Properties" onclick="togglePropertiesView(this);"><i class="columns icon"></i></button>
                </div>   
             </div>
             <br>
@@ -143,7 +145,8 @@
                 <br>
             </div>
             <div id="propertiesView">
-                <iframe src="file_properties.html" style="border: 1px solid red; width: 100%; height: 100vh;"></iframe>
+                <h1>WORK IN PROGRESS</h1>
+                <h3>PREVIEW WINDOW</h3>
             </div>
         </div>
         <!-- Other popup windows -->
@@ -507,6 +510,7 @@
             let hotSearchBuffer = "";
             let hotSearchTimer = null;
             let hotSearchOffsetIndex = 0;
+            let propertiesView = true; //Enable viewing properties on the right sidebar
 
             //Keypress listeners
             let ctrlHold = false;
@@ -522,7 +526,7 @@
             let postUploadModeCutoff = 25 * 1048576; //25MB, files smaller than this will upload using POST Mode
 
             //File Sharing related
-            let shareEditingObject = ""; 
+            let shareEditingObject = "";
             let shareEditingUUID = "";
 
             //System Information
@@ -1761,6 +1765,17 @@
                 setPreference("file_explorer/listmode",targetMode)
             }
 
+            function togglePropertiesView(object){
+                propertiesView = !propertiesView;
+                if (propertiesView){
+                    $("#propertiesView").show();
+                    $(object).addClass('active');
+                }else{
+                    $("#propertiesView").hide();
+                    $(object).removeClass('active');
+                }
+            }
+
             function updateViewmodeButtons(){
                 $(".videmode").removeClass('disabled');
                 $(".videmode").each(function(){