From: Nik Okuntseff Date: Mon, 21 Mar 2016 22:02:20 +0000 (-0700) Subject: Refactoring - white space X-Git-Tag: timetracker_1.19-1~1802 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a781da5661a1932521e0d1feb4be340b97edce9a;p=timetracker.git Refactoring - white space --- diff --git a/WEB-INF/templates/expense_edit.tpl b/WEB-INF/templates/expense_edit.tpl index 79be8185..5f4a4e46 100644 --- a/WEB-INF/templates/expense_edit.tpl +++ b/WEB-INF/templates/expense_edit.tpl @@ -27,7 +27,7 @@ projects = new Array(); empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}'; // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; var dropdown = document.getElementById("project"); diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl index 3c42c6d9..cfc1fe67 100644 --- a/WEB-INF/templates/expenses.tpl +++ b/WEB-INF/templates/expenses.tpl @@ -27,7 +27,7 @@ projects = new Array(); empty_label_project = '{$i18n.dropdown.select|escape:'javascript'}'; // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; var dropdown = document.getElementById("project"); @@ -42,7 +42,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) @@ -118,51 +118,40 @@ function get_date() {
- {if $expense_items} +{if $expense_items} -{if in_array('cl', explode(',', $user->plugins))} + {if in_array('cl', explode(',', $user->plugins))} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} + {/if} - {foreach $expense_items as $item} + {foreach $expense_items as $item} -{if in_array('cl', explode(',', $user->plugins))} + {if in_array('cl', explode(',', $user->plugins))} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} + {/if} - + - {/foreach} -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.item} {$i18n.label.cost} {$i18n.label.edit}
{$item.client|escape:'html'}{$item.project|escape:'html'}{$item.item|escape:'html'} {$item.cost} - {if $item.invoice_id} -   - {else} - {$i18n.label.edit} - {/if} - {if $item.invoice_id} {else}{$i18n.label.edit}{/if}
- {if $expense_items} - - - - -
{$i18n.label.day_total}: {$user->currency|escape:'html'} {$day_total}
- {/if} - - {/if} + {/foreach} +
+ + + + +
{$i18n.label.day_total}: {$user->currency|escape:'html'} {$day_total}
+{/if} {$forms.expensesForm.close} - - diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index 2d3bb203..90a42891 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -55,7 +55,7 @@ With 101% height we essentially force the scrollbar to always appear. --> - + {if $authenticated} {if $user->isAdmin()} @@ -185,4 +185,4 @@ With 101% height we essentially force the scrollbar to always appear. --> {/if} - \ No newline at end of file + diff --git a/WEB-INF/templates/invoice_add.tpl b/WEB-INF/templates/invoice_add.tpl index 092e3ff8..e166b089 100644 --- a/WEB-INF/templates/invoice_add.tpl +++ b/WEB-INF/templates/invoice_add.tpl @@ -15,12 +15,12 @@ {$i18n.label.client} (*): {$forms.invoiceForm.client.control} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {$i18n.label.project}: {$forms.invoiceForm.project.control} -{/if} +{/if} {$i18n.label.start_date} (*): {$forms.invoiceForm.start.control} @@ -50,4 +50,4 @@ if (dateField && !dateField.value) { var today = new Date(); dateField.value = today.strftime("{$user->date_format}"); } - \ No newline at end of file + diff --git a/WEB-INF/templates/invoice_view.tpl b/WEB-INF/templates/invoice_view.tpl index ceeeffc9..57b917e7 100644 --- a/WEB-INF/templates/invoice_view.tpl +++ b/WEB-INF/templates/invoice_view.tpl @@ -37,7 +37,7 @@ {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {$invoice_item.project_name|escape:'html'} {/if} - {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {$invoice_item.task_name|escape:'html'} {/if} {$invoice_item.note|escape:'html'} @@ -60,8 +60,7 @@ {$i18n.label.total}: {$total|escape:'html'} - - + {/if} @@ -69,6 +68,3 @@ - - - diff --git a/WEB-INF/templates/invoices.tpl b/WEB-INF/templates/invoices.tpl index ad8f5373..56046f45 100644 --- a/WEB-INF/templates/invoices.tpl +++ b/WEB-INF/templates/invoices.tpl @@ -28,7 +28,7 @@ {/foreach} - + {if !$user->isClient()} diff --git a/WEB-INF/templates/mail.tpl b/WEB-INF/templates/mail.tpl index 5d748afe..cae2304a 100644 --- a/WEB-INF/templates/mail.tpl +++ b/WEB-INF/templates/mail.tpl @@ -40,4 +40,4 @@

-{$forms.mailForm.close} \ No newline at end of file +{$forms.mailForm.close} diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index 2a663c82..5b4d1fd4 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -80,4 +80,4 @@ {/if} - \ No newline at end of file + diff --git a/WEB-INF/templates/mobile/login.db.tpl b/WEB-INF/templates/mobile/login.db.tpl index 11a7e713..2968b1da 100644 --- a/WEB-INF/templates/mobile/login.db.tpl +++ b/WEB-INF/templates/mobile/login.db.tpl @@ -4,4 +4,4 @@ {$i18n.label.password}: {$forms.loginForm.password.control} {$forms.loginForm.btn_login.control} - \ No newline at end of file + diff --git a/WEB-INF/templates/mobile/login.ldap.tpl b/WEB-INF/templates/mobile/login.ldap.tpl index 11a7e713..2968b1da 100644 --- a/WEB-INF/templates/mobile/login.ldap.tpl +++ b/WEB-INF/templates/mobile/login.ldap.tpl @@ -4,4 +4,4 @@ {$i18n.label.password}: {$forms.loginForm.password.control} {$forms.loginForm.btn_login.control} - \ No newline at end of file + diff --git a/WEB-INF/templates/mobile/login.tpl b/WEB-INF/templates/mobile/login.tpl index f70c3759..1a2e888e 100644 --- a/WEB-INF/templates/mobile/login.tpl +++ b/WEB-INF/templates/mobile/login.tpl @@ -14,4 +14,4 @@ function get_date() { {$forms.loginForm.close} - \ No newline at end of file + diff --git a/WEB-INF/templates/mobile/time.tpl b/WEB-INF/templates/mobile/time.tpl index 8ae65b0d..8c11af27 100644 --- a/WEB-INF/templates/mobile/time.tpl +++ b/WEB-INF/templates/mobile/time.tpl @@ -51,7 +51,7 @@ function fillDropdowns() { } // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; @@ -68,7 +68,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -100,13 +100,13 @@ function fillProjectDropdown(id) { } // The fillTaskDropdown function populates the task combo box with -// tasks associated with a selected project (project id is passed here as id). +// tasks associated with a selected project (project id is passed here as id). function fillTaskDropdown(id) { var str_ids = task_ids[id]; var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; @@ -131,7 +131,7 @@ function fillTaskDropdown(id) { } // If a previously selected item is still in dropdown - select it. - if (dropdown.options.length > 0) { + if (dropdown.options.length > 0) { for (var i = 0; i < dropdown.options.length; i++) { if (dropdown.options[i].value == selected_item) { dropdown.options[i].selected = true; @@ -161,18 +161,18 @@ function formDisable(formField) { } if ((formFieldValue != "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; - var x = eval("document.timeRecordForm.finish"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.start"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.finish"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); + var x = eval("document.timeRecordForm.start"); x.disabled = false; x.style.background = "white"; var x = eval("document.timeRecordForm.finish"); @@ -204,7 +204,7 @@ function get_date() { @@ -230,13 +230,13 @@ function get_date() { {if $record.invoice_id} {else}{$i18n.label.edit}{/if} {/foreach} - - +
+ -
{$i18n.label.day_total}: {$day_total}
+ {/if} @@ -248,7 +248,7 @@ function get_date() { - {/if} - + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} @@ -29,4 +29,4 @@
+ {if in_array('cl', explode(',', $user->plugins))} @@ -293,4 +293,4 @@ function get_date() {
{$i18n.label.client}:
-{$forms.timeRecordForm.close} \ No newline at end of file +{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/time_delete.tpl b/WEB-INF/templates/mobile/time_delete.tpl index 31c6daa0..3afc823e 100644 --- a/WEB-INF/templates/mobile/time_delete.tpl +++ b/WEB-INF/templates/mobile/time_delete.tpl @@ -8,7 +8,7 @@
{$i18n.label.project}{$i18n.label.duration}{$i18n.label.note}{$i18n.label.note}
-{$forms.timeRecordForm.close} \ No newline at end of file +{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/time_edit.tpl b/WEB-INF/templates/mobile/time_edit.tpl index 977f0a22..729d3ce9 100644 --- a/WEB-INF/templates/mobile/time_edit.tpl +++ b/WEB-INF/templates/mobile/time_edit.tpl @@ -68,7 +68,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -106,7 +106,7 @@ function fillTaskDropdown(id) { var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; @@ -131,7 +131,7 @@ function fillTaskDropdown(id) { } // If a previously selected item is still in dropdown - select it. - if (dropdown.options.length > 0) { + if (dropdown.options.length > 0) { for (var i = 0; i < dropdown.options.length; i++) { if (dropdown.options[i].value == selected_item) { dropdown.options[i].selected = true; @@ -172,12 +172,12 @@ function formDisable(formField) { } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); - x.disabled = false; - x.style.background = "white"; - var x = eval("document.timeRecordForm.finish"); - x.disabled = false; - x.style.background = "white"; + var x = eval("document.timeRecordForm.start"); + x.disabled = false; + x.style.background = "white"; + var x = eval("document.timeRecordForm.finish"); + x.disabled = false; + x.style.background = "white"; } } @@ -251,4 +251,4 @@ function get_date() { -{$forms.timeRecordForm.close} \ No newline at end of file +{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/mobile/timer.tpl b/WEB-INF/templates/mobile/timer.tpl index 5b9e3aa5..bd6bf8b8 100644 --- a/WEB-INF/templates/mobile/timer.tpl +++ b/WEB-INF/templates/mobile/timer.tpl @@ -51,7 +51,7 @@ function fillDropdowns() { } // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; @@ -68,7 +68,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -100,13 +100,13 @@ function fillProjectDropdown(id) { } // The fillTaskDropdown function populates the task combo box with -// tasks associated with a selected project (project id is passed here as id). +// tasks associated with a selected project (project id is passed here as id). function fillTaskDropdown(id) { var str_ids = task_ids[id]; var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; @@ -131,7 +131,7 @@ function fillTaskDropdown(id) { } // If a previously selected item is still in dropdown - select it. - if (dropdown.options.length > 0) { + if (dropdown.options.length > 0) { for (var i = 0; i < dropdown.options.length; i++) { if (dropdown.options[i].value == selected_item) { dropdown.options[i].selected = true; @@ -152,12 +152,6 @@ function get_time() { } - -

00:00 @@ -177,7 +171,7 @@ function updateTimer() { if (startDate == null) startDate = new Date(); endDate = new Date(); delta = new Date(endDate - startDate); - + var hours = delta.getUTCHours(); if (hours < 10) hours = '0'+hours; document.getElementById('hour').innerHTML = hours; @@ -193,7 +187,7 @@ function updateTimer() { function startTimer() { if (timerID) return; - + updateTimer(); timerID = setInterval('updateTimer()', 1000); } @@ -212,36 +206,8 @@ startDate.setMinutes({substr($uncompleted['start'], 3, 2)}); startDate.setSeconds(0); updateTimer(); startTimer(); - -{/if} - - {$forms.timerRecordForm.open} @@ -249,7 +215,7 @@ startTimer(); - - - - - - + + + + + + diff --git a/WEB-INF/templates/notification_edit.tpl b/WEB-INF/templates/notification_edit.tpl index 9234d2a4..ad3a7db0 100644 --- a/WEB-INF/templates/notification_edit.tpl +++ b/WEB-INF/templates/notification_edit.tpl @@ -9,12 +9,12 @@ - - - - - - + + + + + + @@ -27,4 +27,4 @@
-
+ {if in_array('cl', explode(',', $user->plugins))} @@ -299,4 +265,4 @@ startTimer(); {/if} -
{$i18n.label.client}:
\ No newline at end of file +
diff --git a/WEB-INF/templates/notification_add.tpl b/WEB-INF/templates/notification_add.tpl index fe209acf..1e1d955a 100644 --- a/WEB-INF/templates/notification_add.tpl +++ b/WEB-INF/templates/notification_add.tpl @@ -9,12 +9,12 @@
{$i18n.label.cron_schedule} (*):{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$i18n.label.required_fields}
{$i18n.label.cron_schedule} (*):{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$forms.notificationForm.cron_spec.control} {$i18n.label.what_is_it}
{$i18n.label.email} (*):{$forms.notificationForm.email.control}
{$i18n.label.required_fields}
-{$forms.notificationForm.close} \ No newline at end of file +{$forms.notificationForm.close} diff --git a/WEB-INF/templates/notifications.tpl b/WEB-INF/templates/notifications.tpl index 78bd8b19..8b1d95b1 100644 --- a/WEB-INF/templates/notifications.tpl +++ b/WEB-INF/templates/notifications.tpl @@ -2,8 +2,8 @@
- {if $user->canManageTeam()} - +{if $user->canManageTeam()} +
@@ -11,8 +11,8 @@ - {if $notifications} - {foreach $notifications as $notification} + {if $notifications} + {foreach $notifications as $notification} @@ -20,14 +20,14 @@ - {/foreach} - {/if} + {/foreach} + {/if}
{$i18n.label.thing_name} {$i18n.label.cron_schedule}{$i18n.label.edit} {$i18n.label.delete}
{$notification['name']|escape:'html'} {$notification['cron_spec']|escape:'html'}{$i18n.label.edit} {$i18n.label.delete}
- + -

{$forms.notificationsForm.btn_add.control}
- {/if} +
+{/if} diff --git a/WEB-INF/templates/password_change.tpl b/WEB-INF/templates/password_change.tpl index c3cadbdc..797f4a35 100644 --- a/WEB-INF/templates/password_change.tpl +++ b/WEB-INF/templates/password_change.tpl @@ -2,11 +2,11 @@
- {if $result_message} +{if $result_message}
{$result_message}
- {else} +{else} @@ -34,8 +34,8 @@
{$i18n.form.change_password.tip}{$forms.newPasswordForm.btn_save.control}
- {/if} +{/if}
-{$forms.newPasswordForm.close} \ No newline at end of file +{$forms.newPasswordForm.close} diff --git a/WEB-INF/templates/password_reset.tpl b/WEB-INF/templates/password_reset.tpl index 17fe05a9..4b887c3e 100644 --- a/WEB-INF/templates/password_reset.tpl +++ b/WEB-INF/templates/password_reset.tpl @@ -2,11 +2,11 @@
- {if $result_message} +{if $result_message}
{$result_message}
- {else} +{else} @@ -20,7 +20,7 @@
{$i18n.label.login}:{$forms.resetPasswordForm.btn_submit.control}
- {/if} +{/if}
diff --git a/WEB-INF/templates/profile_edit.tpl b/WEB-INF/templates/profile_edit.tpl index 032cc5f4..5a90937b 100644 --- a/WEB-INF/templates/profile_edit.tpl +++ b/WEB-INF/templates/profile_edit.tpl @@ -7,15 +7,15 @@ function handlePluginCheckboxes() { var requiredLabel = document.getElementById("required_label"); if (clientsCheckbox.checked) { requiredCheckbox.style.visibility = "visible"; - requiredLabel.style.visibility = "visible"; - invoicesCheckbox.disabled = false; + requiredLabel.style.visibility = "visible"; + invoicesCheckbox.disabled = false; } else { - requiredCheckbox.checked = false; - requiredCheckbox.style.visibility = "hidden"; - requiredLabel.style.visibility = "hidden"; - invoicesCheckbox.checked = false; + requiredCheckbox.checked = false; + requiredCheckbox.style.visibility = "hidden"; + requiredLabel.style.visibility = "hidden"; + invoicesCheckbox.checked = false; invoicesCheckbox.disabled = true; - } + } var expensesCheckbox = document.getElementById("expenses"); var taxCheckbox = document.getElementById("tax_expenses"); @@ -24,7 +24,7 @@ function handlePluginCheckboxes() { taxCheckbox.style.visibility = "visible"; taxLabel.style.visibility = "visible"; } else { - taxCheckbox.checked = false; + taxCheckbox.checked = false; taxCheckbox.style.visibility = "hidden"; taxLabel.style.visibility = "hidden"; } @@ -65,7 +65,6 @@ function handlePluginCheckboxes() { {$i18n.label.login} (*): {$forms.profileForm.login.control} - {if !$auth_external} {$i18n.label.password} (*): @@ -76,7 +75,6 @@ function handlePluginCheckboxes() { {$forms.profileForm.password2.control} {/if} - {$i18n.label.email}: {$forms.profileForm.email.control} @@ -94,10 +92,6 @@ function handlePluginCheckboxes() { {$i18n.label.team_name}: {$forms.profileForm.team_name.control} - {$i18n.label.currency}: {$forms.profileForm.currency.control} @@ -138,7 +132,7 @@ function handlePluginCheckboxes() { @@ -167,7 +167,7 @@ function handleCheckboxes() { -{if ((in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))} +{if ((in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))} {if in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)}{else}{/if} @@ -179,13 +179,13 @@ function handleCheckboxes() { {/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} - {/if} + {/if} {/if} {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} @@ -197,7 +197,7 @@ function handleCheckboxes() { {/if} {/if} -{if in_array('iv', explode(',', $user->plugins))} +{if in_array('iv', explode(',', $user->plugins))} @@ -236,7 +236,7 @@ function handleCheckboxes() {
{$i18n.label.client}  {$forms.reportForm.option.control}
{$i18n.label.project}  {$i18n.label.task}
{$i18n.form.time.billable}  
-{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))} +{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))} {if in_array('cl', explode(',', $user->plugins))} @@ -245,7 +245,7 @@ function handleCheckboxes() { {/if} -{/if} +{/if} @@ -257,8 +257,8 @@ function handleCheckboxes() { {/if} - - + + {if ($custom_fields && $custom_fields->fields[0])} @@ -276,7 +276,7 @@ function handleCheckboxes() {
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if}
{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if}{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if}{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}{/if}{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))}{/if} {$forms.reportForm.group_by.control}
- +
@@ -298,4 +298,4 @@ function handleCheckboxes() {
-{$forms.reportForm.close} \ No newline at end of file +{$forms.reportForm.close} diff --git a/WEB-INF/templates/task_add.tpl b/WEB-INF/templates/task_add.tpl index 9b568c8a..53ce483d 100644 --- a/WEB-INF/templates/task_add.tpl +++ b/WEB-INF/templates/task_add.tpl @@ -30,4 +30,4 @@
-{$forms.taskForm.close} \ No newline at end of file +{$forms.taskForm.close} diff --git a/WEB-INF/templates/task_delete.tpl b/WEB-INF/templates/task_delete.tpl index 1b2d5272..f25cc951 100644 --- a/WEB-INF/templates/task_delete.tpl +++ b/WEB-INF/templates/task_delete.tpl @@ -17,4 +17,4 @@ -{$forms.taskDeleteForm.close} \ No newline at end of file +{$forms.taskDeleteForm.close} diff --git a/WEB-INF/templates/task_edit.tpl b/WEB-INF/templates/task_edit.tpl index b82a093d..5af8d935 100644 --- a/WEB-INF/templates/task_edit.tpl +++ b/WEB-INF/templates/task_edit.tpl @@ -34,4 +34,4 @@ -{$forms.taskForm.close} \ No newline at end of file +{$forms.taskForm.close} diff --git a/WEB-INF/templates/tasks.tpl b/WEB-INF/templates/tasks.tpl index 54d5be56..2c996a1f 100644 --- a/WEB-INF/templates/tasks.tpl +++ b/WEB-INF/templates/tasks.tpl @@ -81,4 +81,4 @@ {/if} - \ No newline at end of file + diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index 93670656..d1610112 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -51,7 +51,7 @@ function fillDropdowns() { } // The fillProjectDropdown function populates the project combo box with -// projects associated with a selected client (client id is passed here as id). +// projects associated with a selected client (client id is passed here as id). function fillProjectDropdown(id) { var str_ids = project_ids[id]; var dropdown = document.getElementById("project"); @@ -67,7 +67,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -99,16 +99,16 @@ function fillProjectDropdown(id) { } // The fillTaskDropdown function populates the task combo box with -// tasks associated with a selected project (project id is passed here as id). +// tasks associated with a selected project (project id is passed here as id). function fillTaskDropdown(id) { var str_ids = task_ids[id]; var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; - + // Remove existing content. dropdown.length = 0; // Add mandatory top option. @@ -130,7 +130,7 @@ function fillTaskDropdown(id) { } // If a previously selected item is still in dropdown - select it. - if (dropdown.options.length > 0) { + if (dropdown.options.length > 0) { for (var i = 0; i < dropdown.options.length; i++) { if (dropdown.options[i].value == selected_item) { dropdown.options[i].selected = true; @@ -160,18 +160,18 @@ function formDisable(formField) { } if ((formFieldValue != "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; - var x = eval("document.timeRecordForm.finish"); - x.value = ""; - x.disabled = true; - x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.start"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; + var x = eval("document.timeRecordForm.finish"); + x.value = ""; + x.disabled = true; + x.style.background = "#e9e9e9"; } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); + var x = eval("document.timeRecordForm.start"); x.disabled = false; x.style.background = "white"; var x = eval("document.timeRecordForm.finish"); @@ -291,60 +291,60 @@ function get_time() {
- {if $time_records} +{if $time_records} -{if in_array('cl', explode(',', $user->plugins))} + {if in_array('cl', explode(',', $user->plugins))} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} + {/if} + {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{/if} + {/if} - {foreach $time_records as $record} + {foreach $time_records as $record} -{if in_array('cl', explode(',', $user->plugins))} + {if in_array('cl', explode(',', $user->plugins))} -{/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {/if} + {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{/if} -{if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} + {/if} + {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{/if} + {/if} - {/foreach} -
{$i18n.label.client}{$i18n.label.project}{$i18n.label.task}{$i18n.label.start} {$i18n.label.finish}{$i18n.label.duration} {$i18n.label.note} {$i18n.label.edit}
{$record.client|escape:'html'}{$record.project|escape:'html'}{$record.task|escape:'html'}{if $record.start}{$record.start}{else} {/if} {if $record.finish}{$record.finish}{else} {/if}{if $record.duration <> '0:00'}{$record.duration}{else}{$i18n.form.time.uncompleted}{/if} {if $record.comment}{$record.comment|escape:'html'}{else} {/if} - {if $record.invoice_id} + {if $record.invoice_id}   - {else} + {else} {$i18n.label.edit} - {if $record.duration == '0:00'} + {if $record.duration == '0:00'} - {/if} - {/if} + {/if} + {/if}
- {/if} + {/foreach} +
+{/if} @@ -357,5 +357,3 @@ function get_time() { {/if} {$forms.timeRecordForm.close} - - diff --git a/WEB-INF/templates/time_delete.tpl b/WEB-INF/templates/time_delete.tpl index 946a21e1..8470fc3a 100644 --- a/WEB-INF/templates/time_delete.tpl +++ b/WEB-INF/templates/time_delete.tpl @@ -17,7 +17,7 @@ {if (($smarty.const.TYPE_DURATION == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} {$i18n.label.duration} {/if} - {$i18n.label.note} + {$i18n.label.note} {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} @@ -47,4 +47,4 @@ -{$forms.timeRecordForm.close} \ No newline at end of file +{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/time_edit.tpl b/WEB-INF/templates/time_edit.tpl index ba8974fe..4a97fc96 100644 --- a/WEB-INF/templates/time_edit.tpl +++ b/WEB-INF/templates/time_edit.tpl @@ -49,7 +49,7 @@ function fillDropdowns() { fillTaskDropdown(document.timeRecordForm.project.value); } - + // The fillProjectDropdown function populates the project combo box with // projects associated with a selected clientt (client id is passed here as id). function fillProjectDropdown(id) { @@ -68,7 +68,7 @@ function fillProjectDropdown(id) { // Populate project dropdown. if (!id) { // If we are here, client is not selected. - var len = projects.length; + var len = projects.length; for (var i = 0; i < len; i++) { dropdown.options[i+1] = new Option(projects[i][1], projects[i][0]); if (dropdown.options[i+1].value == selected_item) { @@ -106,7 +106,7 @@ function fillTaskDropdown(id) { var dropdown = document.getElementById("task"); if (dropdown == null) return; // Nothing to do. - + // Determine previously selected item. var selected_item = dropdown.options[dropdown.selectedIndex].value; @@ -172,12 +172,12 @@ function formDisable(formField) { } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); - x.disabled = false; - x.style.background = "white"; - var x = eval("document.timeRecordForm.finish"); - x.disabled = false; - x.style.background = "white"; + var x = eval("document.timeRecordForm.start"); + x.disabled = false; + x.style.background = "white"; + var x = eval("document.timeRecordForm.finish"); + x.disabled = false; + x.style.background = "white"; } } @@ -203,7 +203,7 @@ function setNow(formField) { -
+ {if in_array('cl', explode(',', $user->plugins))} @@ -272,4 +272,4 @@ function setNow(formField) {
-{$forms.timeRecordForm.close} \ No newline at end of file +{$forms.timeRecordForm.close} diff --git a/WEB-INF/templates/user_add.tpl b/WEB-INF/templates/user_add.tpl index 144a8e9c..29714044 100644 --- a/WEB-INF/templates/user_add.tpl +++ b/WEB-INF/templates/user_add.tpl @@ -80,4 +80,4 @@ function handleClientControl() {
-{$forms.userForm.close} \ No newline at end of file +{$forms.userForm.close} diff --git a/WEB-INF/templates/user_delete.tpl b/WEB-INF/templates/user_delete.tpl index 291dc4b5..1f5b442e 100644 --- a/WEB-INF/templates/user_delete.tpl +++ b/WEB-INF/templates/user_delete.tpl @@ -17,4 +17,4 @@ -{$forms.userDeleteForm.close} \ No newline at end of file +{$forms.userDeleteForm.close} diff --git a/WEB-INF/templates/user_edit.tpl b/WEB-INF/templates/user_edit.tpl index 5fa98694..7f81ca03 100644 --- a/WEB-INF/templates/user_edit.tpl +++ b/WEB-INF/templates/user_edit.tpl @@ -14,9 +14,9 @@ idx++; function getRate(project_id) { var length = project_rates.length; for(var i = 0; i < length; i++) { - if(project_rates[i][0] == project_id) { - return project_rates[i][1]; - } + if(project_rates[i][0] == project_id) { + return project_rates[i][1]; + } } var default_rate = document.userForm.rate.value; return default_rate; @@ -33,7 +33,7 @@ function setRate(element) { for (var i = 0; i < userForm.elements.length; i++) { if ((userForm.elements[i].type == 'text') && (userForm.elements[i].name == ('rate_'+element.value))) { if (element.checked) { - userForm.elements[i].value = getRate(element.value); + userForm.elements[i].value = getRate(element.value); } else { userForm.elements[i].value = ''; } @@ -47,9 +47,9 @@ function setRate(element) { function handleClientControl() { var clientControl = document.getElementById("client"); if ("16" == document.getElementById("role").value) - clientControl.style.visibility = "visible"; + clientControl.style.visibility = "visible"; else - clientControl.style.visibility = "hidden"; + clientControl.style.visibility = "hidden"; } @@ -109,4 +109,4 @@ function handleClientControl() { -{$forms.userForm.close} \ No newline at end of file +{$forms.userForm.close} diff --git a/WEB-INF/templates/users.tpl b/WEB-INF/templates/users.tpl index f343f9cf..0b64b73c 100644 --- a/WEB-INF/templates/users.tpl +++ b/WEB-INF/templates/users.tpl @@ -44,7 +44,7 @@ {/foreach} {/if} - +

@@ -89,7 +89,7 @@ {/foreach}
- + -
@@ -124,4 +124,4 @@ {/if}
\ No newline at end of file +