svn commit: samba r6133 - in trunk: source/web swat/include swat/js

deryck at samba.org deryck at samba.org
Wed Mar 30 13:02:23 GMT 2005


Author: deryck
Date: 2005-03-30 13:02:23 +0000 (Wed, 30 Mar 2005)
New Revision: 6133

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6133

Log:

More of my SWAT work.  Just getting the globals/conf
page format right.

deryck

Modified:
   trunk/source/web/swat.c
   trunk/swat/include/main.css
   trunk/swat/js/ui.js


Changeset:
Modified: trunk/source/web/swat.c
===================================================================
--- trunk/source/web/swat.c	2005-03-30 12:27:01 UTC (rev 6132)
+++ trunk/source/web/swat.c	2005-03-30 13:02:23 UTC (rev 6133)
@@ -572,17 +572,6 @@
 }
 
 /****************************************************************************
-  display splash page with conf options  
-****************************************************************************/
-static void conf_page(void)
-{
-	printf("  <div class=\"whereto\">\n");
-	printf("    <h2>Configuring Samba</h2>\n\n");
-	printf("    <p>The following options are available for editing your Samba configuration</p>\n");
-	printf("  </div\n");
-}
-
-/****************************************************************************
   display help page  
 ****************************************************************************/
 static void help_page(void)
@@ -837,15 +826,20 @@
 
 
 /****************************************************************************
-  display a globals editing page  
+  display a conf page for editing global parameters 
 ****************************************************************************/
-static void globals_page(void)
+static void conf_page(void)
 {
 	unsigned int parm_filter = FLAG_BASIC;
 	int mode = 0;
 
-	printf("<H2>%s</H2>\n", _("Global Parameters"));
+	printf("  <div class=\"whereto\">\n");
+	printf("    <h2>Configuring Samba</h2>\n\n");
+	printf("    <p>The following menu allows for editing of global parameters affecting your Samba configuration.</p>\n");
+	printf("  </div\n");
 
+	printf("  <div class=\"view_conf\"><a href=\"viewconfig\" onclick=\"openHelp(this.href); return false\">View smb.conf file</a></div>\n\n");
+
 	if (cgi_variable("Commit")) {
 		commit_parameters(GLOBAL_SECTION_SNUM);
 		save_reload(0);
@@ -858,7 +852,7 @@
 	if ( cgi_variable("AdvMode"))
 		mode = 1;
 
-	printf("<form name=\"swatform\" method=post action=globals>\n");
+	printf("<form name=\"swatform\" method=post action=conf>\n");
 
 	ViewModeBoxes( mode );
 	switch ( mode ) {
@@ -1423,8 +1417,6 @@
 		viewconfig_page();
 	} else if (have_read_access && strcmp(page,"rewritecfg")==0) {
 		rewritecfg_file();
-	} else if (have_read_access && strcmp(page, "globals")==0) {
-		globals_page();
 	} else if (have_read_access && strcmp(page,"services")==0) {
 		services_page();
 	} else if (have_read_access && strcmp(page,"shares")==0) {

Modified: trunk/swat/include/main.css
===================================================================
--- trunk/swat/include/main.css	2005-03-30 12:27:01 UTC (rev 6132)
+++ trunk/swat/include/main.css	2005-03-30 13:02:23 UTC (rev 6133)
@@ -69,4 +69,9 @@
 	width:84px;
 	height:40px;
 }
-
+.view_conf {
+  float:right;
+  position:relative;
+  top:-130px;
+}
+}

Modified: trunk/swat/js/ui.js
===================================================================
--- trunk/swat/js/ui.js	2005-03-30 12:27:01 UTC (rev 6132)
+++ trunk/swat/js/ui.js	2005-03-30 13:02:23 UTC (rev 6133)
@@ -95,7 +95,7 @@
 	window.captureEvents(Event.KEYPRESS);
 	window.onkeypress = catchHardReload;
 	
-	if (location.href.indexOf('help') > -1) {
+	if (location.href.indexOf('help') > -1 || location.href.indexOf('viewconfig') > -1) {
 		// Init iframe for file loads
 		setStage();
 



More information about the samba-cvs mailing list