diff --git a/Makefile b/Makefile index 8ab146b3..a5c8cd16 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,7 @@ BINOWNER = root BINGROUP = admin NEED_STRLCPY = CFLAGS += -I/opt/local/include +LIBS += -L/opt/local/lib endif ifeq ($(OSTYPE),FreeBSD) diff --git a/src/elogd.c b/src/elogd.c index 91f6e810..6f5dc8e3 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -7658,12 +7658,12 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head, else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str))) strlcpy(css, str, sizeof(css)); - strlcpy(file_name, resource_dir, sizeof(str)); - strlcat(file_name, "themes", sizeof(str)); - strlcat(file_name, DIR_SEPARATOR_STR, sizeof(str)); - strlcat(file_name, theme_name, sizeof(str)); - strlcat(file_name, DIR_SEPARATOR_STR, sizeof(str)); - strlcat(file_name, css, sizeof(str)); + strlcpy(file_name, resource_dir, sizeof(file_name)); + strlcat(file_name, "themes", sizeof(file_name)); + strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name)); + strlcat(file_name, theme_name, sizeof(file_name)); + strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name)); + strlcat(file_name, css, sizeof(file_name)); FILE *f = fopen(file_name, "rb"); if (f != NULL) { @@ -10103,7 +10103,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("var last_key = 0;\n\n"); rsprintf("var in_asend = false;\n\n"); - rsprintf("function chkform()\n"); + rsprintf("function chkform(button)\n"); rsprintf("{\n"); rsprintf(" if (last_key == 13) {\n"); @@ -10266,7 +10266,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf(" if (autoSaveTimer != null)\n"); rsprintf(" clearTimeout(autoSaveTimer);\n"); + rsprintf(" button.disabled = true;\n"); + rsprintf(" button.value = \"%s...\";\n", loc("Please wait")); rsprintf(" submitted = true;\n"); + rsprintf(" document.getElementById(\"form1\").elements['cmd'][0].value = \"%s\";\n", loc("Submit")); + rsprintf(" document.getElementById(\"form1\").submit();\n"); rsprintf(" return true;\n"); rsprintf("}\n\n"); @@ -10575,7 +10579,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf(">\n"); show_top_text(lbs); - rsprintf("
\n"); /*---- add password in case cookie expires during edit ----*/ @@ -10613,7 +10617,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL /* default cmd */ rsprintf("\n", loc("Update")); - rsprintf("\n", + rsprintf("\n", loc("Submit")); if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1) @@ -12148,7 +12152,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL /*---- menu buttons again ----*/ rsprintf("\n"); - rsprintf("\n", + rsprintf("\n", loc("Submit")); if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1) @@ -14029,7 +14033,6 @@ void show_config_page(LOGBOOK * lbs) rsprintf("\n"); for (j = i = 0; lb_list[i].name[0]; i++) { - if (j==0) rsprintf(""); if (!getcfg_topgroup() || strieq(getcfg_topgroup(), lb_list[i].top_group)) { @@ -14038,6 +14041,7 @@ void show_config_page(LOGBOOK * lbs) /* check if emails are enabled for this logbook */ if (!getcfg(lb_list[i].name, "Suppress email to users", str, sizeof(str)) || atoi(str) == 0) { + if (j==0) rsprintf("
"); if (email_notify[i]) rsprintf("
\n", i, i); @@ -14363,7 +14367,7 @@ void show_new_user_page(LOGBOOK * lbs, char *user) show_html_header(lbs, TRUE, loc("ELOG new user"), TRUE, FALSE, NULL, FALSE, 0); rsprintf("


\n"); show_top_text(lbs); - rsprintf("\n\n"); + rsprintf("\n\n"); /*---- title ----*/ @@ -26369,7 +26373,7 @@ void show_login_page(LOGBOOK * lbs, char *redir, int fail) /* set focus on name field */ rsprintf("\n"); - rsprintf("\n\n"); + rsprintf("\n\n"); /* define hidden fields for current destination */ strlcpy(str, redir, sizeof(str)); @@ -27031,7 +27035,7 @@ void show_calendar(LOGBOOK * lbs) strcpy(index, "1"); show_html_header(lbs, FALSE, loc("Calendar"), TRUE, FALSE, NULL, FALSE, 0); - rsprintf("\n"); + rsprintf("\n"); rsprintf("\n", index); rsprintf("\n", cur_year); @@ -27134,7 +27138,7 @@ void show_uploader(LOGBOOK * lbs) char str[256]; show_html_header(lbs, FALSE, loc("Upload image"), TRUE, FALSE, NULL, FALSE, 0); - rsprintf("\n"); rsprintf("\n"); diff --git a/xcode/elogd.xcodeproj/project.pbxproj b/xcode/elogd.xcodeproj/project.pbxproj index c1696c5c..7076e5ad 100644 --- a/xcode/elogd.xcodeproj/project.pbxproj +++ b/xcode/elogd.xcodeproj/project.pbxproj @@ -155,15 +155,16 @@ D52BA2F113999DB0000458E3 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = PSI; }; buildConfigurationList = D52BA2F413999DB0000458E3 /* Build configuration list for PBXProject "elogd" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = D52BA2EF13999DB0000458E3; productRefGroup = D52BA2FB13999DB0000458E3 /* Products */; @@ -212,6 +213,7 @@ D52BA30113999DB0000458E3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -253,6 +255,7 @@ D52BA30213999DB0000458E3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES;