App-Office-Contacts

 view release on metacpan or  search on metacpan

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated occupation list.

			$("#occ_list_div")
			.empty()
			.append(html);

			$("#status_div").val("Status: Added occupation");
			$("#add_occ_org_name").val("").focus();
			$("#add_occ_occ_title").val("");

			// Step 3: Check to see if the organization which was added
			// as an employer is currently displayed.
			// If they are visible, their list of staff must be updated.

			var visible_org_id = $("#update_org_id").val();

			if (visible_org_id == null)
			{
				return;
			}

			var ajax_org_id = $xml.find("org_id").text();

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated staff list.

			$("#staff_list_div")
			.empty()
			.append(html);

			$("#status_div").val("Status: Added staff member");
			$("#add_staff_person_name").val("").focus();
			$("#add_staff_occ_title").val("");

			// Step 3: Check to see if the person who was added
			// to the staff is currently displayed.
			// If they are visible, their list of occupations must be updated.

			var visible_person_id = $("#update_person_id").val();

			if (visible_person_id == null)
			{
				return;
			}

			var ajax_person_id = $xml.find("person_id").text();

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated staff list.

			$("#staff_list_div")
			.empty()
			.append(html);

			$("#status_div").val("Status: Deleted staff member");

			// Step 3: Check to see if the person who was deleted
			// from the staff is currently displayed.
			// If they are visible, their list of occupations must be updated.

			var visible_person_id = $("#update_person_id").val();

			if (visible_person_id == null)
			{
				return;
			}

			var ajax_person_id = $xml.find("person_id").text();

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated occupation list.

			$("#occ_list_div")
			.empty()
			.append(html);

			$("#status_div").val("Status: Deleted occupation");

			// Step 3: Check to see if the organization which was deleted
			// as an employer is currently displayed.
			// If they are visible, their list of staff must be updated.

			var visible_org_id = $("#update_org_id").val();

			if (visible_org_id == null)
			{
				return;
			}

			var ajax_org_id = $xml.find("org_id").text();

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated occupation list.

			$("#occ_list_div")
			.empty()
			.append(html);
		},
		error: function(jqXHR, status, error)
		{
			status_error("Cannot update occupations for "+ person_name, "HTTP error: " + error);
		}
	});

htdocs/assets/templates/app/office/contacts/homepage.tx  view on Meta::CPAN

			var error = $xml.find("error").text();
			var html  = $xml.find("html").text();

			if (error != "")
			{
				status_error(error, html);

				return;
			}

			// Step 2: Display updated occupation list.

			$("#staff_list_div")
			.empty()
			.append(html);
		},
		error: function(jqXHR, status, error)
		{
			status_error("Cannot update staff for "+ org_name, "HTTP error: " + error);
		}
	});

lib/App/Office/Contacts.pm  view on Meta::CPAN

This is controlled via a config file.

=item o 1 to 4 email addresses per person or organization

4 was chosen just to limit the amount of screen real estate occupied. It can be easily changed.

=item o 1 to 4 phone numbers per person or organization

=item o Installers can provide their own FAQ page

=item o On-screen information hidden in tabs is updated if appropriate

For example, if you add a person to the staff list for an organization, and the details for that person
are on another, hidden, tab (the organization tab must have the focus), then the list of occupations for
that peson is updated as soon as they are added.

=item o jQuery-style autocomplete is used for various fields

The list of fields which support autocomplete are listed both on the appropriate forms and on the default
FAQ page.

=item o An add-on package supports importing vCards, as probably output by your email client

=item o An add-on package supports donations per person and per organization

But L<App::Office::Contacts::Donations> has not yet been updated to match V 2.00 of C<App::Office::Contacts>.

=back

Screen shots:

L<The database schema|http://savage.net.au/Module-reviews/images/Contacts/contacts.schema.png>.

L<Sample search results|http://savage.net.au/Module-reviews/images/Contacts/search.results.png>.

L<Sample personal details|http://savage.net.au/Module-reviews/images/Contacts/personal.details.png>.

lib/App/Office/Contacts/Database.pm  view on Meta::CPAN

			dbh         => $self -> simple -> dbh,
			name        => 'sid',
			pg_bytea    => $$config{pg_bytea} || 0,
			pg_text     => $$config{pg_text}  || 0,
			query       => $self -> query,
			table_name  => $$config{session_table_name},
			type        => $$config{session_driver},
		)
	);

	# Force the session object to be updated by setting an arbitrary parameter.
	# This means the object will be flushed in the teardown phase.

	$self -> session -> param(_initialized => 1);

	$self -> autocomplete(App::Office::Contacts::Database::AutoComplete -> new
	(
		db => $self,
	) );

	$self -> email_address(App::Office::Contacts::Database::EmailAddress -> new



( run in 0.236 second using v1.01-cache-2.11-cpan-05444aca049 )