App-Office-Contacts

 view release on metacpan or  search on metacpan

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

				update_occupations($("#update_person_name").val(), visible_person_id, sid);
			}

			// Lastly, update the search results to remove the deleted organization.

			search();

			// Set focus to Search tab's search_name field.

			global_tab_div.tabs("option", "active", 0);
			setTimeout(function(){$("#search_name").focus();}, 10);
		},
		error: function(jqXHR, status, error)
		{
			status_error("Cannot delete organization", "HTTP error: " + error);
		}
	});
}

function delete_org_note(note_id)
{

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

				update_staff($("#update_org_name").val(), visible_org_id, sid);
			}

			// Lastly, update the search results to remove the deleted person.

			search();

			// Set focus to Search tab's search_name field.

			global_tab_div.tabs("option", "active", 0);
			setTimeout(function(){$("#search_name").focus();}, 10);
		},
		error: function(jqXHR, status, error)
		{
			status_error("Cannot delete person", "HTTP error: " + error);
		}
	});
}

function delete_person_from_staff(person_name, person_id, organization_id, occupation_id)
{

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


			$("#update_org_tab").empty().append(html);
			$("#add_staff_button, #add_org_note_button, #delete_org_button, #update_org_button").button();
			$("#update_org_div").tabs
			({
				beforeActivate: function(event, tab)
				{
					switch (tab.index)
					{
						case 0: // Update org tab.
							setTimeout(function(){$("#update_org_name").focus();}, 10);
							break;
						case 1: // Add staff tab.
							setTimeout(function(){$("#add_staff_person_name").focus();}, 10);
							break;
						case 2: // Add note tab.
							setTimeout(function(){$("#org_note").focus();}, 10);
							break;
					}
				}
			});
			global_tab_div.tabs("option", "active", 1); // Update tab within global tabs.
			update_tab_div.tabs("option", "active", 1); // Organization tab within Update tab.

			// These 2 functions don't work if included globally.
			// They must follow after the 'response' is inserted into the DOM.

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


			$("#update_person_tab").empty().append(html);
			$("#add_occ_button, #add_person_note_button, #delete_person_button, #update_person_button").button();
			$("#update_person_div").tabs
			({
				beforeActivate: function(event, tab)
				{
					switch (tab.index)
					{
						case 0: // Update person tab.
							setTimeout(function(){$("#update_person_given_names").focus();}, 10);
							break;
						case 1: // Add occ tab.
							setTimeout(function(){$("#add_occ_org_name").focus();}, 10);
							break;
						case 2: // Add note tab.
							setTimeout(function(){$("#person_note").focus();}, 10);
							break;
					}
				}
			});
			global_tab_div.tabs("option", "active", 1); // Update tab within global tabs.
			update_tab_div.tabs("option", "active", 0); // Person tab within Update tab.

			// These 2 functions don't work if included globally.
			// They must follow after the 'response' is inserted into the DOM.

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

	// Set up the tabs.

	global_tab_div = $("#global_tab_div")
	.tabs
	({
		beforeActivate: function(event, tab)
		{
			switch (tab.index)
			{
				case 0: // Search tab.
					setTimeout(function(){$("#search_name").focus();}, 10);
					break;
				case 1: // Add tab.
					setTimeout(function(){$("#add_org_name").focus();}, 10);
					setTimeout(function(){$("#add_person_given_names").focus();}, 10);
					break;
			}
		}
	});

	global_tab_div.tabs().css('visibility','visible');

	update_tab_div = $("#update_tab_div")
	.tabs();

	add_tab_div = $("#add_tab_div")
	.tabs
	({
		beforeActivate: function(event, tab)
		{
			switch (tab.index)
			{
				case 0: // Add person tab.
					setTimeout(function(){$("#add_person_given_names").focus();}, 10);
					break;
				case 1: // Add org tab.
					setTimeout(function(){$("#add_org_name").focus();}, 10);
					break;
			}
		}
	});

	// Prepare to add orgs.

	$("#add_org_button").button();
	$("#add_org_button").click(function(e)
	{

inc/Module/Install/Fetch.pm  view on Meta::CPAN


    require Cwd;
    my $dir = Cwd::getcwd();
    chdir $args{local_dir} or return if exists $args{local_dir};

    if (eval { require LWP::Simple; 1 }) {
        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }
    elsif (my $ftp = $self->can_run('ftp')) { eval {
        # no Net::FTP, fallback to ftp.exe
        require FileHandle;
        my $fh = FileHandle->new;



( run in 0.228 second using v1.01-cache-2.11-cpan-4d50c553e7e )