Remove trailing whitespace throughout project

This commit is contained in:
gneissone 2019-04-25 14:51:38 -07:00 committed by Andrew Woods
parent 74b8f16aa2
commit bd6140a8cc
1753 changed files with 24077 additions and 24077 deletions

View file

@ -20,7 +20,7 @@ body{
margin: 0;
padding: 0;
height: 100%; /* needed for container min-height */
font-family: 'Arimo', "Lucida Sans Unicode","Lucida Grande", Geneva, helvetica, sans-serif;
font-family: 'Arimo', "Lucida Sans Unicode","Lucida Grande", Geneva, helvetica, sans-serif;
font-size: 1em;
height: auto !important; /* real browsers */
height: 100%; /* IE6: treaded as min-height*/;
@ -28,46 +28,46 @@ body{
margin: 0 auto;
}
body{
background: #fff url(../images/header-background.gif) center 0 repeat-x;
background: #fff url(../images/header-background.gif) center 0 repeat-x;
}
/* h1,h2,h3,h4,h5,h6 ------> */
h1 {
padding: 8px 0 6px 0;
margin: 0;
font-size: 1.5em;
font-size: 1.5em;
}
h2 {
padding: 8px 0 6px 0;
margin: 0;
font-size: 1.4em;
color: #2485ae;
color: #2485ae;
}
h2 a{
color: #2485ae;
color: #2485ae;
}
h2 a:link, h2 a:visited{
text-decoration: underline;
text-decoration: underline;
}
h2 a:hover, h2 a:active{
text-decoration: none;
text-decoration: none;
}
h3{
padding: 8px 0 6px 0;
margin: 0;
font-size: 1.2em;
color: #2485ae;
color: #2485ae;
}
h4{
padding: 4px 0 4px 0;
margin: 0;
font-size: 1.1em;
color: #000000;
color: #000000;
}
h5{
padding: 3px 0 2px 0;
margin: 0;
font-size: 1em;
color: #2485ae;
color: #2485ae;
}
a {
@ -224,7 +224,7 @@ p{
/* MISCELLANEOUS ------> */
.blue{
color: #2485ae;
color: #2485ae;
}
.grey{
color: #5e6363;

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
Copyright (c) ${year}, Cornell University
All rights reserved.
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@ -10,16 +10,16 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Cornell University nor the names of its contributors
may be used to endorse or promote products derived from this software
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -2,16 +2,16 @@
<!-- $This file is distributed under the terms of the license in LICENSE$ -->
<!-- ======================================================================
Build script for the ORNG Shindig webapp.
<!-- ======================================================================
Build script for the ORNG Shindig webapp.
This can be used on its own, or invoked from the "orng" target of the main build file.
====================================================================== -->
<project name="ORNG-shindig" default="describe">
<!-- =================================
target: describe
<!-- =================================
target: describe
================================= -->
<target name="describe" description="--> Describe the targets (this is the default).">
<echo>
@ -21,13 +21,13 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
</echo>
</target>
<!-- =================================
target: all
<!-- =================================
target: all
================================= -->
<target name="all" depends="clean, deploy" description="--> Run 'clean', then 'deploy'" />
<!-- - - - - - - - - - - - - - - - - -
target: properties
<!-- - - - - - - - - - - - - - - - - -
target: properties
- - - - - - - - - - - - - - - - - -->
<target name="properties">
<property name="build.properties.file" location="../webapp/config/build.properties" />
@ -39,7 +39,7 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
</not>
</condition>
</fail>
<property file="${build.properties.file}" />
<fail unless="tomcat.home" message="${build.properties.file} must contain a value for tomcat.home" />
@ -48,14 +48,14 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
<property name="runtime.properties.file" location="${vitro.home}/runtime.properties" />
<fail message="The runtime properties file &quot;${runtime.properties.file}&quot; does not exist.">
<fail message="The runtime properties file &quot;${runtime.properties.file}&quot; does not exist.">
<condition>
<not>
<available file="${runtime.properties.file}" />
</not>
</condition>
</fail>
<property file="${runtime.properties.file}" />
<fail unless="VitroConnection.DataSource.url" message="${runtime.properties.file} must contain a value for VitroConnection.DataSource.url" />
@ -110,16 +110,16 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
<property name="shindig.properties.template.file" location="${basedir}/shindigorng.properties.template" />
<property name="shindig.properties.modified.file" location="${build.shindig.dir}/shindigorng.properties" />
<property name="shindig.properties.deployed.file" location="${shindig.config.dir}/shindigorng.properties" />
<!-- sample-gadgets webapp -->
<property name="sample.webapp.original.dir" location="./sample-gadgets" />
<property name="sample.webapp.deployed.dir" location="${tomcat.webapps.dir}/sample-gadgets" />
</target>
<!-- =================================
target: clean
<!-- =================================
target: clean
================================= -->
<target name="clean" depends="properties" description="--> Delete all artifacts">
<delete includeemptydirs="true" failonerror="false">
@ -130,8 +130,8 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
</delete>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: prepare
<!-- - - - - - - - - - - - - - - - - -
target: prepare
- - - - - - - - - - - - - - - - - -->
<target name="prepare" depends="properties">
<mkdir dir="${build.dir}" />
@ -141,8 +141,8 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
<mkdir dir="${shindig.config.dir}" />
</target>
<!-- - - - - - - - - - - - - - - - - -
target: modifyPropertiesFile
<!-- - - - - - - - - - - - - - - - - -
target: modifyPropertiesFile
- - - - - - - - - - - - - - - - - -->
<target name="modifyPropertiesFile" depends="properties, prepare">
<copy file="${shindig.properties.template.file}" toFile="${shindig.properties.modified.file}">
@ -157,8 +157,8 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
</copy>
</target>
<!-- =================================
target: deploy
<!-- =================================
target: deploy
================================= -->
<target name="deploy" depends="modifyPropertiesFile" description="--> Deploy the application directly into the Tomcat webapps directory.">
<copy file="${shindig.properties.modified.file}" tofile="${shindig.properties.deployed.file}" />
@ -168,4 +168,4 @@ deploy - Configure the application and deploy directly into the Tomcat webapps
</copy>
</target>
</project>
</project>

View file

@ -14,28 +14,28 @@
<Content type="html" view="default, home, profile">
<![CDATA[<!--HTML-->
<!DOCTYPE html>
<!-- #includes -->
<link rel="stylesheet" href="css/gadget.css" type="text/css" media="screen, projection" >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="js/os.js" ></script>
<style>
.links_title { font-family:Verdana, Arial; font-size: 14px; }
.links_body { font-family:Arial; font-size: 12px; }
.links_credit { font-family:Arial; font-size:10px; }
.links_save_button { height:20px; font-size:11px; }
.links_save_button { height:20px; font-size:11px; }
a, a:visited { color: #0088CC; text-decoration: none; }
a:hover { color: #005580; text-decoration: underline; }
</style>
<script type="text/javascript">
var g_max_links = 5;
var g_oLinks = []; // declare it like this to make json work
// ========================================
function sort_by (field, reverse, primer) {
reverse = (reverse) ? -1 : 1;
return function(a,b) {
@ -51,100 +51,100 @@
}
}
// ========================================
// ========================================
function deleteArrayItem (array_index) {
g_oLinks.splice(array_index,1);
// write links data to gadget database
osapi.appdata.update({'userId': '@viewer', 'appId': '@app', 'data': {'links' : gadgets.json.stringify(g_oLinks)} }).execute(function(result) {
if (result.error) {
if (result.error) {
alert("Error " + result.error.code + " writing application data: " + result.error.message + ". Your edited link list was not saved.");
}
});
// show links w/o deleted item even if data write fails - array already spliced
displayData();
}
// ========================================
// ========================================
function readData(callback) {
osapi.appdata.get({'userId': '@owner', 'appId':'@app', 'fields' : ['links']} ).execute(function(result){
// get incoming link data (in json string format)
var viewer = os.osapi.getViewerFromResult(result);
// convert to json object format
g_oLinks = gadgets.json.parse(viewer.links) || [];
// execute the callback;
callback();
}); /* end osapi.appdata.get */
}); /* end osapi.appdata.get */
}
// ========================================
// ========================================
// ========================================
function displayData() {
// if links data exists
if (g_oLinks) {
// sort object by link name, case-insensitive, A-Z
g_oLinks.sort(sort_by('link_name', false, function(a){return a.toUpperCase()}));
if (document.getElementById("edit_links_table")){
// EDIT MODE - build table to hold retrieved app data
var links_table_data = "<table cellspacing='10' cellpadding='0' border='0'><tr>";
var favicon_path_array;
for (i in g_oLinks) {
cell_name = g_oLinks[i].link_name;
cell_url = g_oLinks[i].link_url;
cell_url2 = g_oLinks[i].link_url;
favicon_path_array = cell_url.split("//");
cell_url2 = favicon_path_array[1];
favicon_path_array = cell_url2.split("/");
cell_url2 = favicon_path_array[0];
cell_favicon="<img height='16' width=16' src='http://www.google.com/s2/favicons?domain=" + cell_url2 + "' />";
// build and add table row
links_table_data = links_table_data
+ "<tr>" + "<td>" + cell_favicon + "</td>"
+ "<td>" + "<a href='" + cell_url + "' target='_blank'>" + cell_name + "</a></td>"
+ "<td>" + cell_url + "</td>"
+ "<td><input type='button' class='links_save_button' value='Delete' onClick='deleteArrayItem("
+ "<td><input type='button' class='links_save_button' value='Delete' onClick='deleteArrayItem("
+ i + ")'" + "></td>" + "</tr>";
}
// close the table
links_table_data = links_table_data + "</tr></table>";
// put appdata table markup in designated div
// and set height based on which view view this is
document.getElementById("edit_links_table").innerHTML=links_table_data;
gadgets.window.adjustHeight(250 + ((g_oLinks.length - 1) * 28 * 2) + 10 );
}
if(document.getElementById("view_links_table")){
if(document.getElementById("view_links_table")){
// VIEW MODE - build table to hold retrieved app data
links_table_data = "<table cellspacing='10' cellpadding='0' border='0'><tr>";
for (i in g_oLinks) {
cell_name = g_oLinks[i].link_name;
cell_url = g_oLinks[i].link_url;
cell_url2 = g_oLinks[i].link_url;
favicon_path_array = cell_url.split("//");
cell_url2 = favicon_path_array[1];
favicon_path_array = cell_url2.split("/");
@ -155,14 +155,14 @@
links_table_data = links_table_data
+ "<tr>" + "<td>" + cell_favicon + "</td>"
+ "<td onClick=\"gadgetEventTrack('go_to_website', cell_name)\">" + "<a href='" + cell_url + "' target='_blank'>" + cell_name + "</a></td>" + "</tr>";
}
}
// close the table
links_table_data = links_table_data + "</tr></table>";
// put appdata table markup in designated div
document.getElementById("view_links_table").innerHTML=links_table_data;
if (g_oLinks.length > 0) {
gadgets.window.adjustHeight( 12 + ((g_oLinks.length - 1) * 30) + 34 );
gadgets.window.adjustHeight( 12 + ((g_oLinks.length - 1) * 30) + 34 );
}
else {
gadgets.pubsub.publish("hide");
@ -171,10 +171,10 @@
} /* end if link data exists */
}
// ========================================
// ========================================
function saveData() {
// get link name and url from form
@ -182,24 +182,24 @@
var new_link_url=document.getElementById("linkurl").value;
if (g_oLinks.length < g_max_links || !g_oLinks) {
// check for empty input boxes
if(new_link_name=="" || new_link_url==""){
alert("Please provide both a Link Name and a URL");
return;
}
// prepend http header if missing
if(new_link_url.indexOf("://") == -1){new_link_url = "http://" + new_link_url;}
var newLinkNdx = g_oLinks.length;
g_oLinks[newLinkNdx] = {};
g_oLinks[newLinkNdx].link_name = new_link_name;
g_oLinks[newLinkNdx].link_url = new_link_url;
g_oLinks[newLinkNdx] = {};
g_oLinks[newLinkNdx].link_name = new_link_name;
g_oLinks[newLinkNdx].link_url = new_link_url;
// write links data to gadget database
osapi.appdata.update({'userId': '@viewer', 'appId': '@app', 'data': {'links' : gadgets.json.stringify(g_oLinks)} }).execute(function(result) {
if (result.error) {
if (result.error) {
alert("Error " + result.error.code + " writing application data: " + result.error.message);
} else {
@ -210,7 +210,7 @@
alert("Your links information is saved. Don't forget to use the Hide / Show links to make this section visible or hidden on your profile page.");
}
});
} else {
alert("You already have the maximum number of links.");
}
@ -218,32 +218,32 @@
// ==============================================================
function gadgetEventTrack(action, label, value) {
var message = {'action' : action};
if (label) {message.label = label;}
if (value) {message.value = value;}
gadgets.pubsub.publish("analytics", message);
}
}
// ==============================================================
</script>
]]></Content>
<!-- ==================== END COMBINED VIEWS ==================== -->
<!-- ==================== START HOME/EDIT VIEW ==================== -->
<Content type="html" view="home" preferred_height="300" preferred_width="700">
<![CDATA[<!--HTML-->
<h3 style="padding-left:10px; padding-top: 0px;">Manage Links to Other Websites</h3>
<div style="padding:5px 0px 0px 25px;">
Add up to five websites to your profile.
Enter the website name, as you want it to appear on your profile, and its URL.
Add up to five websites to your profile.
Enter the website name, as you want it to appear on your profile, and its URL.
Some samples include a link to your lab web site, your research program or your research blog.<br /><br />
</div>
<!-- display the new link input fields -->
<div class='question' style="padding:0px 0px 5px 12px;">
<table cellpadding="0" cellspacing="0">
@ -260,19 +260,19 @@
</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><br /><br /><input type="button" style="margin-bottom: 8px;" value="Save" onClick="saveData();"></td>
</tr>
</table>
</tr>
</table>
</div>
<h4 style="padding-left:10px; padding-top: 0px;">Your Current Websites:</h4>
<div id="edit_links_table" style="padding:0px 0px 10px 25px;"></div>
<script type="text/javascript">
gadgets.util.registerOnLoadHandler(function() {
readData(displayData)
});
</script>
]]></Content>
<!-- ==================== END HOME/EDIT VIEW ==================== -->
@ -280,15 +280,15 @@
<!-- ==================== START PROFILE VIEW ==================== -->
<Content type="html" view="profile" preferred_height="100" preferred_width="670">
<![CDATA[<!--HTML-->
<div id="view_links_table" style="padding:0px 0px 10px 20px;"></div>
<div id="view_links_table" style="padding:0px 0px 10px 20px;"></div>
<script type="text/javascript">
gadgets.util.registerOnLoadHandler(function() {
readData(displayData)
});
</script>
]]></Content>
<!-- ==================== END PROFILE VIEW ==================== -->

View file

@ -13,12 +13,12 @@
<Content type="html" view="default, home, profile"><![CDATA[<!--HTML-->
<!DOCTYPE html>
<!-- #includes -->
<link rel="stylesheet" href="css/gadget.css" type="text/css" media="screen, projection" >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="js/os.js" ></script>
<style>
.mentor_title {
font-family: Verdana, Arial;
@ -31,7 +31,7 @@
.mentor_credit {
font-family: Arial;
font-size: 10px;
}
}
.mentor_list {
font-family: Arial;
font-size: 11px;
@ -40,132 +40,132 @@
font-family: Arial;
font-size: 12px;
font-weight: normal;
}
}
a, a:visited { color: #0088CC; text-decoration: none; }
a:hover { color: #005580; text-decoration: underline; }
</style>
<script type="text/javascript">
var g_chars_allowed=2000;
var g_textarea_content="";
function limit_chars(){
num_chars = document.getElementById("facultyNarrative").value.length;
num_chars = document.getElementById("facultyNarrative").value.length;
if (num_chars > g_chars_allowed) {
alert("Your narrative exceeds the maximum number of characters.");
document.getElementById("facultyNarrative").value = g_textarea_content;
}
else {
g_textarea_content = document.getElementById("facultyNarrative").value;
else {
g_textarea_content = document.getElementById("facultyNarrative").value;
}
}
// ==============================================================
function gadgetEventTrack(action, label, value) {
var message = {'action' : action};
if (label) {message.label = label;}
if (value) {message.value = value;}
gadgets.pubsub.publish("analytics", message);
}
// ==============================================================
}
// ==============================================================
function displayMentorAppData() {
var fields = ["careerMentor", "coMentor", "leadResearch", "projectMentor",
"contactEmail", "contactPhone", "contactAssistant",
"assistantName", "assistantEmail", "assistantPhone",
"contactEmail", "contactPhone", "contactAssistant",
"assistantName", "assistantEmail", "assistantPhone",
"narrative", "lastUpdate"];
osapi.appdata.get( {'userId': '@owner', 'appId':'@app', 'fields': fields } ).execute(function(result) {
if (result.error) {
if (result.error) {
alert("Error " + result.error.code + " reading application data: " + result.error.message);
} else {
// get incoming mentor data
// get incoming mentor data
var viewer = os.osapi.getViewerFromResult(result);
if (viewer.careerMentor == "T" && document.getElementById("edit_career_mentor") )
document.getElementById("edit_career_mentor").checked = true;
if (viewer.coMentor == "T" && document.getElementById("edit_co_mentor") )
document.getElementById("edit_co_mentor").checked = true;
document.getElementById("edit_co_mentor").checked = true;
if (viewer.leadResearch == "T" && document.getElementById("edit_lead_research") )
document.getElementById("edit_lead_research").checked = true;
document.getElementById("edit_lead_research").checked = true;
if (viewer.projectMentor == "T" && document.getElementById("edit_project_mentor") )
document.getElementById("edit_project_mentor").checked = true;
document.getElementById("edit_project_mentor").checked = true;
if (viewer.contactEmail == "T" && document.getElementById("edit_email"))
document.getElementById("edit_email").checked = true;
if (viewer.contactPhone == "T" && document.getElementById("edit_phone"))
document.getElementById("edit_phone").checked = true;
if (viewer.contactAssistant == "T" && document.getElementById("edit_assistant"))
document.getElementById("edit_assistant").checked = true;
document.getElementById("edit_assistant").checked = true;
if (viewer.assistantName && document.getElementById("edit_assistant_name") )
if (viewer.assistantName && document.getElementById("edit_assistant_name") )
document.getElementById("edit_assistant_name").value = viewer.assistantName;
if (viewer.assistantEmail && document.getElementById("edit_assistant_email") )
document.getElementById("edit_assistant_email").value = viewer.assistantEmail;
if (viewer.assistantPhone && document.getElementById("edit_assistant_phone") )
document.getElementById("edit_assistant_phone").value = viewer.assistantPhone;
if (viewer.narrative)
document.getElementById("facultyNarrative").value = viewer.narrative;
if (viewer.lastUpdate)
document.getElementById("last_updated").innerHTML = viewer.lastUpdate;
// VIEW MODE - build table to hold retrieved app data
var view_window_height=80;
var mentor_as = "hidden";
var mentor_contact = "hidden";
if (viewer.careerMentor == "T" && document.getElementById("mentor_as_career_mentor") && document.getElementById("mentor_as") ) {
document.getElementById("mentor_as").style.display = "block";
document.getElementById("mentor_as_career_mentor").style.display = "block";
view_window_height += 20;
mentor_as = "visible";
}
if (viewer.coMentor == "T" && document.getElementById("mentor_as_co_mentor") && document.getElementById("mentor_as") ) {
document.getElementById("mentor_as").style.display = "block";
document.getElementById("mentor_as_co_mentor").style.display = "block";
view_window_height += 20;
mentor_as = "visible";
}
if (viewer.leadResearch == "T" && document.getElementById("mentor_as_lead_research") && document.getElementById("mentor_as") ) {
document.getElementById("mentor_as").style.display = "block";
document.getElementById("mentor_as_lead_research").style.display = "block";
view_window_height += 20;
mentor_as = "visible";
}
if (viewer.projectMentor == "T" && document.getElementById("mentor_as_project_mentor") && document.getElementById("mentor_as") ) {
if (viewer.projectMentor == "T" && document.getElementById("mentor_as_project_mentor") && document.getElementById("mentor_as") ) {
document.getElementById("mentor_as").style.display = "block";
document.getElementById("mentor_as_project_mentor").style.display = "block";
view_window_height += 20;
mentor_as = "visible";
}
if (viewer.contactEmail == "T" && document.getElementById("mentor_contact_email") && document.getElementById("mentor_contact") ) {
if (viewer.contactEmail == "T" && document.getElementById("mentor_contact_email") && document.getElementById("mentor_contact") ) {
document.getElementById("mentor_contact").style.display = "block";
document.getElementById("mentor_contact_email").style.display = "block";
view_window_height += 20;
mentor_contact = "visible";
}
if (viewer.contactPhone == "T" && document.getElementById("mentor_contact_phone") && document.getElementById("mentor_contact") ) {
document.getElementById("mentor_contact").style.display = "block";
document.getElementById("mentor_contact_phone").style.display = "block";
view_window_height += 20;
mentor_contact = "visible";
}
if (viewer.contactAssistant == "T" && document.getElementById("mentor_contact_assistant") && document.getElementById("mentor_contact") ) {
document.getElementById("mentor_contact").style.display = "block";
document.getElementById("mentor_contact_assistant").style.display = "block";
@ -179,52 +179,52 @@
document.getElementById("mentor_assistant_name").innerHTML += viewer.assistantName;
view_window_height += 20;
}
if (viewer.assistantEmail && document.getElementById("mentor_assistant") && document.getElementById("mentor_assistant_email") ) {
document.getElementById("mentor_assistant_email").style.display = "block";
document.getElementById("mentor_assistant_email").innerHTML += viewer.assistantEmail;
view_window_height += 20;
}
if (viewer.assistantPhone && document.getElementById("mentor_assistant") && document.getElementById("mentor_assistant_phone") ) {
document.getElementById("mentor_assistant_phone").style.display = "block";
document.getElementById("mentor_assistant_phone").innerHTML += viewer.assistantPhone;
view_window_height += 20;
}
if (viewer.narrative) {
document.getElementById("facultyNarrative").style.display = "block";
var p_chars = viewer.narrative;
// count the characters and calculate number of rows
p_num_chars = p_chars.length;
// count the characters and calculate number of rows
p_num_chars = p_chars.length;
document.getElementById("facultyNarrative").innerHTML = p_chars;
p_lines = Math.round(p_num_chars / 100);
if (p_lines < 1) {p_lines = 1}
view_window_height += (p_lines * 15);
// note works in FF but not IE:
// view_window_height += document.getElementById('facultyNarrative').offsetHeight;
}
if (viewer.lastUpdated)
document.getElementById("last_updated").innerHTML = viewer.lastUpdated;
if (mentor_as == "visible") {view_window_height += 20};
if (mentor_contact == "visible") {view_window_height += 20};
// adjust the window height - only do this here if in profile VIEW (not in EDIT)
if (document.getElementById("mentor_as")) {
if (document.getElementById("mentor_as")) {
gadgets.window.adjustHeight(view_window_height);
}
} /* end else */
}); /*osapi.appdata.get*/
}); /*osapi.appdata.get*/
}
function saveMentorAppData() {
var mentor_today = new Date();
var weekday=new Array(7);
weekday[0]="Sunday";
@ -234,7 +234,7 @@
weekday[4]="Thursday";
weekday[5]="Friday";
weekday[6]="Saturday";
var month=new Array(12);
month[0]="January";
month[1]="February";
@ -247,43 +247,43 @@
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
month[11]="December";
var mentor_day = weekday[mentor_today.getDay()]
var mentor_month = month[mentor_today.getMonth()]
var mentor_date = mentor_today.getDate();
var mentor_year = mentor_today.getFullYear();
var current_date = mentor_day + " " + mentor_month + " " + mentor_date + ", " + mentor_year;
// pack the data into an Object (md for mentor data)
// with property names that match the values in the "fields" array
// used by osapi.appdate.get in displayMentorAppData
var current_date = mentor_day + " " + mentor_month + " " + mentor_date + ", " + mentor_year;
// pack the data into an Object (md for mentor data)
// with property names that match the values in the "fields" array
// used by osapi.appdate.get in displayMentorAppData
var md = {};
md.careerMentor = document.getElementById("edit_career_mentor").checked ? "T" : "F";
md.coMentor = document.getElementById("edit_co_mentor").checked ? "T" : "F";
md.leadResearch = document.getElementById("edit_lead_research").checked ? "T" : "F";
md.projectMentor = document.getElementById("edit_project_mentor").checked ? "T" : "F";
md.contactEmail = document.getElementById("edit_email").checked ? "T" : "F";
md.contactPhone = document.getElementById("edit_phone").checked ? "T" : "F";
md.contactAssistant = document.getElementById("edit_assistant").checked ? "T" : "F";
md.assistantName = document.getElementById("edit_assistant_name").value;
md.assistantEmail = document.getElementById("edit_assistant_email").value;
md.assistantPhone = document.getElementById("edit_assistant_phone").value;
md.narrative = document.getElementById("facultyNarrative").value;
md.lastUpdate = current_date;
osapi.appdata.update({'userId': '@viewer', 'appId':'@app', 'data':md }).execute(function(result) {
if (result.error) {
if (result.error) {
alert("Error " + result.error.code + " writing application data: " + result.error.message);
}
}
});
}
</script>
]]></Content>
<!-- ==================== END COMBINED VIEWS ==================== -->
@ -292,23 +292,23 @@
<!-- ==================== START HOME/EDIT VIEW ==================== -->
<Content type="html" view="default, home" preferred_width="700"><![CDATA[<!--HTML-->
<h4 style="padding-left:12px;">Add Faculty Mentoring to Your Profile</h4>
<div id='AddEdit' style="padding:15px 0px 0px 12px;">
Add details about your availability to mentor UCSF faculty.
Learn about the <a href="http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php" target="_blank" title="Go to the UCSF Faculty Mentoring Website">Faculty Mentoring Program</a>
Add details about your availability to mentor UCSF faculty.
Learn about the <a href="http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php" target="_blank" title="Go to the UCSF Faculty Mentoring Website">Faculty Mentoring Program</a>
and the <a href="http://ctsi.ucsf.edu/training/mdp-announcement" target="_blank" title="Go to the CTSI MDP Web page">CTSI&nbsp;Mentor&nbsp;Development&nbsp;Program</a>
<br /><br />
</div>
<div>
<div style="float:left;">
<span class="mentor_message">&nbsp;&nbsp;&nbsp;
Be sure to <b>SAVE</b> your work below.</span>
</div>
<div class="updated" style="float:right; display:block; text-align:left; padding-right:10px; font-size: 10px;">
Last Updated: <span id="last_updated" style="font-size: 10px;"></span>
</div>
@ -328,11 +328,11 @@
<td valign="middle" class="mentor_list">
<input id="edit_lead_research" type="checkbox">Lead Research / Scholarly Mentor&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td valign="middle" class="mentor_list">
<input id="edit_project_mentor" type="checkbox">Project Mentor</td>
<input id="edit_project_mentor" type="checkbox">Project Mentor</td>
</tr>
</table>
</div>
</div>
<div class='question'>
<h4>My Contact Preference:</h4>
<table cellspacing="0" cellpadding="15">
@ -349,7 +349,7 @@
</tr>
</table>
</div>
<div class='question' style="padding:0px 0px 0px 10px;">
<span class="mentor_list"><b>Assistant Details</b></span><br>
<fieldset class='details roundbox'>
@ -369,23 +369,23 @@
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><label class='textlabel'>Phone</label>
<input id="edit_assistant_phone"></td>
</tr>
</table>
</tr>
</table>
</fieldset>
</div>
<div class='question'>
<h4>Mentoring Narrative:&nbsp;<img src="images/hovertiptarget.png" border="0" onClick="document.getElementById('sample').style.display='block';">
<span class="mentor_message">&nbsp;&nbsp;Be sure to <b>SAVE</b> your work below.</span></h4>
<div id="sample" style="display:none; border:1px solid #383838; padding:10px 10px 10px 10px; margin:10px; height:160px;">
<div style="padding-bottom: 5px;">
<button style="float:right;" onClick="document.getElementById('sample').style.display='none';">Close</button><br>
<center><b>Sample Mentor Narratives</b> (cut and paste to create your own)</center><br>
</div>
<div style="height:110px; padding: 0px 0px 0 5px;overflow:auto;">
EXAMPLE 1:<br />
Dr. Brown is willing to mentor faculty, fellows, residents and students interested in an academic research career. Most often her mentees have had training in clinical research methods or will obtain training through the CTSI CTST. For students, it is expected they will have dedicated time for research. Through email or meeting, if there is a “match” for research interest, time, and training, further discussions as to project, goals, and access to resources (space, databases, and statistical support) will be discussed to provide a productive experience.
@ -394,17 +394,17 @@
I am highly qualified to participate as a lead mentor or co-mentor at UCSF. My program of research is focused on health outcomes associated with disturbed sleep in various populations of healthy women and women with chronic illnesses like HIV/AIDS and cancer. I have completed cross-sectional studies, longitudinal studies, and most recently, randomized clinical trials to improve sleep. I have mentored doctoral students and postdoctoral fellows studying various patient populations, from the very young to very old. During my tenure at UCSF, I have directly supervised over 30 doctoral students, mentored 14 postdoctoral trainees, and served as a lead mentor for 6 pre-tenured faculty. I have been the Director for a T32 Nurse Research Training Grant since 1996, and I have been honored with being voted mentor of the year by doctoral students on two occasions. I play a significant role in the clinical and translational (CTSI) research mentoring and career development programs at UCSF. I am the seminar leader for the first session in the CTSI Mentor Development program on “Rewards and Challenges of Mentoring” and I have co-mentored two KL2 scholars. I have published over 50 peer-reviewed research articles with trainees as first-author, and serve as a consultant on two external K awards as well as three external R01 awards with former mentees. Finally, I have served on many different NIH study section review panels, and I served as the Chair of an NIH study section (2008-2010), which allows me to be particularly effective in mentoring early career principal investigators who are writing their first NIH applications.
<br><br>
I can provide mentees a cubicle space with my research team, tangible resources such as access to large datasets for secondary analysis as needed, and intangible resources such as attending our formal research team meetings and our informal spontaneous group discussions as well as networking at national sleep research conferences.
</div>
</div>
<fieldset>
<textarea id="facultyNarrative" rows='9' cols='72' class='roundbox' style="margin-left:12px;" name="facultyNarrative" onKeyDown="limit_chars()" onKeyUp="limit_chars()" onMouseout="limit_chars()"></textarea>
<span style="margin-left:12px;white-space:nowrap">(2000 characters max)</span>
</fieldset>
</fieldset>
</div>
<div>
<center>
<input type="button" onClick="saveMentorAppData();" value="Save">
@ -412,12 +412,12 @@
<input type="button" onClick="displayMentorAppData()" value="Cancel">
</center>
</div>
<script type="text/javascript" >
// retrieve last-saved data and map it to the fields in the markup
displayMentorAppData();
gadgets.window.adjustHeight(700);
</script>
</script>
]]></Content>
@ -427,7 +427,7 @@
<!-- ==================== START PROFILE VIEW ==================== -->
<Content type="html" view="default, profile" preferred_width="670"><![CDATA[<!--HTML-->
<div class="updated" style="display:block; text-align:left; padding: 5px 10px 10px 0; font-size: 10px;">
Last Updated: <span id="last_updated" style="font-size: 10px;"></span>
</div>
@ -435,7 +435,7 @@
<div>
<p id="facultyNarrative" style="margin-left:20px; margin-right:20px; font-family:Arial; font-size:12px; display:none;"></p>
</div>
<div id="mentor_as" style="display:none; margin-left:20px;">
<span class='detailtitle'>Available to Mentor as: </span> (<a href="http://ctsi.ucsf.edu/training/mdp-seminar1-definitions" target="_blank" title="Go to the Mentor Role Definitions Web page" onClick="gadgetEventTrack('view_mentor_roles', 'http://ctsi.ucsf.edu/training/mdp-seminar1-definitions'); return true">Review Mentor Role Definitions</a>):
<span id="mentor_as_career_mentor" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Career Mentor</span>
@ -443,36 +443,36 @@
<span id="mentor_as_lead_research" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Lead Research / Scholarly Mentor</span>
<span id="mentor_as_project_mentor" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Project Mentor</span>
</div>
<div id="mentor_contact" style="padding:10px 0 0 0; display:none; margin-left: 20px;">
<span class='detailtitle'>Contact for Mentoring:</span>
<ul style="width:400px;">
<li id="mentor_contact_email" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Email (see above)</li>
<li id="mentor_contact_phone" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Phone (see above)</li>
<li id="mentor_contact_assistant" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Assistant</li>
<li id="mentor_contact_assistant" style="display:none; padding-botom:3px;"><span style="font-size:18px;">&nbsp;&nbsp;&nbsp;<b>&middot;</b>&nbsp;</span>Assistant</li>
</ul>
</div>
<div id="mentor_assistant" style="padding:5px 0 0 0; display:none; margin-left: 55px;">
<div id="mentor_assistant_name" style="display:none; height:20px;">Name:&nbsp;</div>
<div id="mentor_assistant_email" style="display:none; height:20px;">Email:&nbsp;</div>
<div id="mentor_assistant_phone" style="display:none; height:20px;">Phone:&nbsp;</div>
</div>
<div style="padding:10px 0px 0px 20px;">
Learn about the <a href="http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php" target="_blank" title="Go to the UCSF Faculty Mentoring Website" onClick="gadgetEventTrack('go_to_program', 'http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php'); return true">Faculty Mentoring Program</a>
<div style="padding:10px 0px 0px 20px;">
Learn about the <a href="http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php" target="_blank" title="Go to the UCSF Faculty Mentoring Website" onClick="gadgetEventTrack('go_to_program', 'http://academicaffairs.ucsf.edu/ccfl/faculty_mentoring_program.php'); return true">Faculty Mentoring Program</a>
and the <a href="http://ctsi.ucsf.edu/training/mdp-announcement" target="_blank" title="Go to the CTSI | MDP Web page" onClick="gadgetEventTrack('go_to_development', 'http://ctsi.ucsf.edu/training/mdp-announcement'); return true">CTSI Mentor Development Program</a>
<br /><br />
</div>
<script type="text/javascript">
displayMentorAppData();
</script>
</script>
]]></Content>
<!-- ==================== END PROFILE VIEW ==================== -->
</Module>
</Module>

View file

@ -9,13 +9,13 @@
</ModulePrefs>
<Content type="html" view="canvas, small"><![CDATA[<!--HTML-->
<!DOCTYPE html>
<!-- #includes -->
<link rel="stylesheet" href="css/gadget.css" type="text/css" media="screen, projection" >
<script type="text/javascript" src="js/os.js" ></script>
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script type="text/javascript" src="js/environment.js"></script>
<style>
.tool_title {font-family:Arial,Helvetica; font-size:14px;}
.tool_title_orange {font-weight:bold; font-family:Arial,Helvetica; font-size:14px; color:#CA7C29;margin-top:-1px;}
@ -25,30 +25,30 @@
.tool_table_cell_small {font-family:Arial,Helvetica;font-size:11px;}
.tool_table_cell_small span a {font-size:11px;}
.tool_table_cell_small span {font-size:11px;display:inline-block;margin-right: -15px; }
.tool_toggle_button {font-size: 13px;padding:0 5px;}
.tool_toggle_button {font-size: 13px;padding:0 5px;}
a, a:visited { color: #0088CC; text-decoration: none; }
a:hover { color: #005580; text-decoration: underline; }
</style>
<script type="text/javascript">
// ==============================================================
function gadgetEventTrack(action, label, value) {
var message = {'action' : action};
if (label) {message.label = label;}
if (value) {message.value = value;}
gadgets.pubsub.publish("analytics", message);
}
}
// ==============================================================
function showHelp() {
var pop = window.open('Create a Group Help','','top=200,left=200,width=450,height=340,scrollbars=0,status=0,menubar=0,location=0,resizable=0');
pop.document.title = "Create a Group Help";
pop.document.write("<html><head></head><body><div style='margin:10px; font-family:Arial; font-size:12px;'>");
pop.document.write("<html><head></head><body><div style='margin:10px; font-family:Arial; font-size:12px;'>");
pop.document.write("Create a list of profiles and start a UCSF Chatter group or email list from here. "
+ "Here's how:<br><ol>"
+ "<li>Click the 'Create Now!' button</li>"
@ -66,33 +66,33 @@
+ "To learn more about UCSF Chatter, go to "
+ "<a href='http://it.ucsf.edu/services/chatter' target='_blank'>"
+ "http://it.ucsf.edu/services/chatter</a>");
pop.document.write("<br><br><center>"
+ "<input type = 'button' value = 'Close' onclick = 'window.close();'>"
pop.document.write("<br><br><center>"
+ "<input type = 'button' value = 'Close' onclick = 'window.close();'>"
+ "</center>");
pop.document.write("</body></html>");
}
// ==============================================================
function getNewProfilesStats(sender, message) {
var stats = gadgets.json.parse(message);
// display the action item table and update it
$("#actions").show();
if (message === 0) {
document.getElementById("add_profiles").innerHTML = "No Profiles found";
document.getElementById("add_profiles").innerHTML = "No Profiles found";
}
else {
document.getElementById("add_profiles").innerHTML = "<a style='font-size:11px;' href='javascript:addNewProfiles();'>Add " + message + " to list</a>";
}
}
function addNewProfiles() {
document.getElementById("add_profiles").innerHTML = "Adding profiles...";
document.getElementById("list_profiles").innerHTML = "Merging into list...";
document.getElementById("add_profiles").innerHTML = "Adding profiles...";
document.getElementById("list_profiles").innerHTML = "Merging into list...";
readIdsFromDB(function(existingIds) {
gadgets.pubsub.subscribe("JSONPersonIds", getNewIdsCallback(existingIds));
});
}
function getNewIdsCallback(existingIds) {
return function(sender, message) {
// extract the array of incoming person IDs
@ -101,7 +101,7 @@
var addedListSize = getListSize(newIds);
var priorListSize = getListSize(existingIds);
// merge the incoming and existing person ID arrays
// existing array already populated
for (var baseURI in newIds) {
@ -110,7 +110,7 @@
}
existingIds[baseURI] = dedupeArray(existingIds[baseURI].concat(newIds[baseURI]));
}
var newListSize = getListSize(existingIds);
showCurrentListSize(newListSize);
@ -122,63 +122,63 @@
}
else {
document.getElementById("add_profiles").innerHTML = (addedListSize == 1 ? "Profile already in list" : "Profiles already in list");
}
}
};
}
// ==============================================================
function getListSize(ids) {
var cnt = 0;
for (var baseURI in ids) {
cnt += ids[baseURI].length;
}
return cnt;
}
}
// ==============================================================
function showCurrentListSize(count) {
if (count > 0) {
document.getElementById("list_profiles").innerHTML = "<a href='javascript:gadgets.views.requestNavigateTo(\"canvas\");'>" + count + " Profiles in list</a>";
}
else {
document.getElementById("list_profiles").innerHTML = "List is currently empty";
}
}
}
function showToolVersion(canvasMode) {
// fetch the extended state
osapi.appdata.get({'userId':'@viewer', 'appId':'@app', 'fields':['extended']} )
.execute(function(result) {
.execute(function(result) {
if (os.osapi.getViewerFromResult(result).extended == "True") {
if (canvasMode) {
document.getElementById("extended_functions").style.display = "inline-block";
document.getElementById("extended_functions").style.padding = "0 0 0 20px";
document.getElementById("canvas_help").innerHTML =
document.getElementById("canvas_help").innerHTML =
'Create a UCSF Chatter group or email list that includes the people below. '
+ 'To manage your UCSF Chatter group after you create it, such as adding or '
+ 'To manage your UCSF Chatter group after you create it, such as adding or '
+ 'removing members, go to UCSF Chatter directly.' ;
}
}
}
else {
// this is what people who have limited functionality (only chatter group) see
if (canvasMode) {
document.getElementById("basic_functions").style.display = "inline-block";
document.getElementById("basic_functions").style.padding = "0 0 0 20px";
document.getElementById("canvas_help").innerHTML =
document.getElementById("canvas_help").innerHTML =
'Create a UCSF Chatter group that includes the people below. '
+ 'To manage your group after you create it, such as adding or '
+ 'To manage your group after you create it, such as adding or '
+ 'removing members, go to UCSF Chatter directly.' ;
}
}
}
// if we are not in canvas mode, show the On/Off state correctly
if (!canvasMode) {
if (!canvasMode) {
readCountFromDB( function(count) {
showCurrentListSize(count);
});
});
gadgets.pubsub.subscribe("PersonResultCount", getNewProfilesStats);
}
}
});
}
// ==============================================================
@ -192,16 +192,16 @@
}
return uriList;
}
// first argument is an map of data,
// second argument is the callback function to execute after updating the data
function saveData(ids, callback) {
// first argument is an map of data,
// second argument is the callback function to execute after updating the data
function saveData(ids, callback) {
osapi.appdata.update({'userId': '@viewer', 'appId':'@app', 'data': {'count' : '' + getListSize(ids), 'ids' : gadgets.json.stringify(ids)}}).execute(callback);
}
// ==============================================================
function readCountFromDB(callback) {
osapi.appdata.get({'userId':'@viewer', 'appId':'@app', 'fields':'count'}).execute(function(result) {
osapi.appdata.get({'userId':'@viewer', 'appId':'@app', 'fields':'count'}).execute(function(result) {
// a map of {baseURI1 : ["string", "string"], baseURI2 : ["string", "string"]}
var count = os.osapi.getViewerFromResult(result).count || 0;
callback(count);
@ -209,59 +209,59 @@
}
function readIdsFromDB(callback) {
osapi.appdata.get({'userId':'@viewer', 'appId':'@app', 'fields':'ids'}).execute(function(result) {
osapi.appdata.get({'userId':'@viewer', 'appId':'@app', 'fields':'ids'}).execute(function(result) {
// a map of {baseURI1 : ["string", "string"], baseURI2 : ["string", "string"]}
var existingIds = os.osapi.getViewerFromResult(result).ids || "{}";
callback(gadgets.json.parse(existingIds));
});
}
// ==============================================================
// ==============================================================
function deleteList() {
osapi.appdata['delete']({'userId':'@viewer', 'appId':'@app', 'fields': ['ids', 'count']} )
.execute(function(result){
if (result.error) {
if (result.error) {
alert("Error " + result.error.code + " deleting application data: " + result.error.message);
} else {
document.getElementById("canvas_email_list_textarea").value = "";
document.getElementById("canvas_full_list_textarea").value = "";
document.getElementById("canvas_profile_list").innerHTML = "";
document.getElementById("number_selected").innerHTML = "Select Profiles";
}
}
}); /* end osapi.appdata.delete */
}
// ==============================================================
}
// ==============================================================
function dedupeArray(arrHasDupes) {
var deduped = [];
$.each(arrHasDupes, function(i, el){
if($.inArray(el, deduped) === -1) deduped.push(el);
});
return deduped;
return deduped;
}
// ==============================================================
// ==============================================================
function displayProfileList(existingIds) {
function displayProfileList(existingIds) {
var uris = toURIList(existingIds);
// put these as individual fields in an ontology.js file
// pass in as options to getRdf call
// pass in as options to getRdf call
var fullName = 'http://profiles.catalyst.harvard.edu/ontology/prns#fullName';
var preferredTitle = 'http://vivoweb.org/ontology/core#preferredTitle';
var email = 'http://vivoweb.org/ontology/core#email';
var email = 'http://vivoweb.org/ontology/core#email';
var strTable="<table cellspacing='0' cellpadding='0' width='640'><tr>";
// build the table header row
strTable += "<td align='left' valign='top' class='tool_table_cell'>" + "<u><b>Name</b></u></td>";
strTable += "<td align='left' valign='top' class='tool_table_cell'>" + "<u><b>Title</b></u></td>";
strTable += "<td align='left' valign='top' class='tool_table_cell'>" + "<u><b>Email&nbsp;Address</b></u></td>";
strTable += "</tr>";
for (i in uris) {
//strTable += "<tr id='" + uris[i] + "'><div id='displayPerson_" + i + "'></div></tr>";
strTable += "<tr id='" + uris[i] + "'></tr>";
}
}
strTable += "</table>";
// dispay the empty table in canvas view
document.getElementById("canvas_profile_list").innerHTML = strTable;
document.getElementById("number_selected").innerHTML = "Your list includes (" + uris.length + ")" + " selected profiles";
@ -269,14 +269,14 @@ var email = 'http://vivoweb.org/ontology/core#email';
// initialize the export divs
document.getElementById("canvas_email_list_textarea").value = "";
document.getElementById("canvas_full_list_textarea").value = "";
// load in groups of ten
var batchSize = 10;
var batchCount = Math.floor(uris.length/batchSize) + (uris.length % batchSize == 0 ? 0 : 1);
for (i = 0; i < uris.length; i += batchSize) {
var ids = '';
for (j = 0; j < batchSize && i+j < uris.length; j++) {
ids += (j > 0 ? ',' : '') + uris[i + j];
ids += (j > 0 ? ',' : '') + uris[i + j];
}
osapi.rdf.getRDF(ids).execute(function(data) {
var people = data.list;
@ -286,16 +286,16 @@ var email = 'http://vivoweb.org/ontology/core#email';
for (var j = 0; j < people.length; j++) {
var base = people[j].base;
people[j] = jsonldHelper.getItem(people[j]);
// put in div now so people can see progress
var table_row = "<td align='left' valign='top' class='tool_table_cell'>" + people[j][fullName] + "</td>";
table_row += "<td align='left' valign='top' class='tool_table_cell'>" + people[j][preferredTitle] + "</td>";
table_row += "<td align='left' valign='top' class='tool_table_cell email'>" + (people[j][email] ? people[j][email] : "") + "</td>";
document.getElementById(base + people[j]['@id']).innerHTML = table_row;
}
// see if we are done and if so turn off progress bar and
// add to export lists
// add to export lists
if (--batchCount == 0) {
var full_list = "";
var email_list = "";
@ -305,49 +305,49 @@ var email = 'http://vivoweb.org/ontology/core#email';
}
var row = "";
$("td", tr).each(function(fld_index, td){
var txt = $(td).text();
var txt = $(td).text();
row += txt + ";";
if(fld_index == 2 && txt != "") {
email_list += txt + "\n";
}
});
full_list += row + "\n";
});
document.getElementById("canvas_full_list_textarea").value = full_list;
document.getElementById("canvas_email_list_textarea").value = email_list;
document.getElementById("progress").style.display="none";
}
});
}
} /* end displayProfileList */
// ==============================================================
// ==============================================================
function copyEmailDivToClipboard() {
$("#canvas_email_list").show();
$("#canvas_email_list_text").show();
$("#canvas_full_list").hide();
$("#canvas_full_list_text").hide();
$("#canvas_profile_list").hide();
$("#canvas_profile_list").hide();
}
// ==============================================================
// ==============================================================
function copyFullDivToClipboard() {
$("#canvas_full_list").show();
$("#canvas_full_list_text").show();
$("#canvas_email_list").hide();
$("#canvas_email_list_text").hide();
$("#canvas_profile_list").hide();
}
// ==============================================================
}
// ==============================================================
var root = (typeof ENV_LOCAL_URL === 'undefined')? "": ENV_LOCAL_URL;
var chatterProxyURL = root + "/chatter/ChatterProxyService.svc";
var chatterProxyURL = root + "/chatter/ChatterProxyService.svc";
function getNodeIdFromURI(uri) {
if (typeof uri === 'string') {
if (typeof uri === 'string') {
var c = uri.split('/');
return c[c.length-1];
}
@ -355,11 +355,11 @@ var email = 'http://vivoweb.org/ontology/core#email';
var retval = [];
for ( i = 0; i < uri.length; i++) {
retval[i] = getNodeIdFromURI(uri[i]);
}
}
return retval;
}
}
function createGroup(name, description, ownerId, users) {
document.getElementById("progress").style.display="block";
@ -368,11 +368,11 @@ var email = 'http://vivoweb.org/ontology/core#email';
"description": description,
"ownerId": ownerId,
"users": users};
sendRequest(false, false, chatterProxyURL + "/group/new", params, function(data) {
document.getElementById("progress").style.display="none";
if(data.Success) {
showMessage("<strong>Success! Your UCSF Chatter group '" + name + "' has been created.</strong><br> "
showMessage("<strong>Success! Your UCSF Chatter group '" + name + "' has been created.</strong><br> "
+ "<a target='_blank' href='" + data.URL + "'>Go to UCSF Chatter to start working with your group.</a>");
$("input#goup_name").val("");
}
@ -384,10 +384,10 @@ var email = 'http://vivoweb.org/ontology/core#email';
showMessage("Server error " + obj.rc + " : " + obj.errors, true);
});
}
// ==============================================================
// ==============================================================
function sendRequest(cache, signed, url, post_params, success, error) {
var params = {};
var params = {};
if (signed) {
params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
}
@ -397,35 +397,35 @@ var email = 'http://vivoweb.org/ontology/core#email';
if(cache == false) {
params[gadgets.io.RequestParameters.REFRESH_INTERVAL] = 0;
}
gadgets.io.makeRequest(url, function(obj) {
if(obj.data != null) {
success(obj.data);
}
else if(obj.errors != null) {
else if(obj.errors != null) {
if(error) {
error(obj);
}
}
}
}
, params);
}
// ==============================================================
// ==============================================================
function showMessage(msg, isError) {
$("div.message").html(msg);
if(isError == true) {
$("div.message").removeClass("info");
$("div.message").removeClass("info");
$("div.message").addClass("error");
}
else {
$("div.message").removeClass("error");
$("div.message").removeClass("error");
$("div.message").addClass("info");
}
$("div.message").removeClass("hidden");
$("div.message").removeClass("hidden");
}
// ==============================================================
// ==============================================================
function getUserList() {
var items = [];
$("div#canvas_profile_list tr").each( function(index, elem) {
@ -433,15 +433,15 @@ var email = 'http://vivoweb.org/ontology/core#email';
if(id != null && id != "") {
items.push(getNodeIdFromURI(id));
}
});
});
return items.join(',');
}
// ==============================================================
// ==============================================================
</script>]]></Content>
<Content type="html" view="small" preferred_height="75" preferred_width="190"><![CDATA[<!--HTML-->
<!DOCTYPE html>
<table id="button_and_help" cellspacing="6" cellpadding="5" style="display:block;">
<tr>
<td class="tool_table_cell_small" style="width:145px">Add profiles to your list</td>
@ -458,12 +458,12 @@ var email = 'http://vivoweb.org/ontology/core#email';
<td class="tool_table_cell_small" valign="top" style="padding-top:4px"><span id="list_profiles" onClick="gadgetEventTrack('list_profiles')">Loading...</span></td>
</tr>
</table>
<script type="text/javascript">
function init() {
showToolVersion(false);
}
}
gadgets.util.registerOnLoadHandler(init);
</script>]]></Content>
<Content type="html" view="canvas" preferred_height="600" preferred_width="700"><![CDATA[<!--HTML-->
@ -499,9 +499,9 @@ var email = 'http://vivoweb.org/ontology/core#email';
a, a:visited { color: #0088CC; text-decoration: none; }
a:hover { color: #005580; text-decoration: underline; }
p { width: 640px; }
</style>
<!-- top menu links -->
<div style="width:640px;">
<p id="number_selected" class="tool_title_orange" style="margin-left:20px;margin-top:20px\9;">
@ -510,7 +510,7 @@ var email = 'http://vivoweb.org/ontology/core#email';
<p class="tool_body" style="margin-left:20px; margin-bottom:10px;">
<div id="extended_functions" style="display:none;">
<a href="" id="create_group">Create UCSF Chatter Group</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:gadgetEventTrack('export_email');copyEmailDivToClipboard();">Export email addresses only</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:gadgetEventTrack('export_email');copyEmailDivToClipboard();">Export email addresses only</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:gadgetEventTrack('export_all_data');copyFullDivToClipboard();">Export all data</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="" id="compose-email">Compose email to list</a><p>
</div>
@ -519,7 +519,7 @@ var email = 'http://vivoweb.org/ontology/core#email';
</div>
<a href="javascript:gadgetEventTrack('delete_list');deleteList();" style="margin-left:20px;">Delete list</a>
</p>
<p id="progress" style="margin-left:20px;">
<br><br>
<img src="images/waiting.gif">
@ -527,73 +527,73 @@ var email = 'http://vivoweb.org/ontology/core#email';
<b>This may take a minute or two, based on the size of your selected Profiles list.</b></p>
</div>
<div id="create_group" class="hidden">
<div class="message hidden"><strong>Success! Your UCSF Chatter group has been created.</strong><br>
<div class="message hidden"><strong>Success! Your UCSF Chatter group has been created.</strong><br>
Go to UCSF Chatter to start working with your group.</div>
<table><tr>
<table><tr>
<td nowrap valign="top">UCSF Chatter Group Name:</td>
<td><input id="group_name" type="text" style="width:218px"></input><br><br></td></tr><tr>
<td nowrap valign="top" align="right">Group Description:</td>
<td><textarea id="group_description" rows="4" cols="25"></textarea><br><br></td></tr><tr><td>&nbsp;</td>
<td><input id="create" type="button" value="Create"></input>
<input id="close" type="button" value="Cancel/Close"></input></td></tr></table>
<input id="close" type="button" value="Cancel/Close"></input></td></tr></table>
</div>
<div id="canvas_email_list" style="display:none; background:#FFF; width:670px; height:50px; margin-left:20px;">
Copy and paste the email addresses below into an Excel spreadsheet or email client "To" field.
<input type="button" style="height:22px; font-size:10; margin-left:40px; margin-top: 6px;" value="Close" onClick="document.getElementById('canvas_email_list').style.display='none';document.getElementById('canvas_email_list_text').style.display='none';document.getElementById('canvas_profile_list').style.display='block';"></button>
</div>
<!-- holds the email address list to be copied to the clipboard -->
<div id="canvas_email_list_text" style="display:none; width:658px; height:450px; color:#000; margin:0px 5px 0px 5px;">
<textarea id="canvas_email_list_textarea" rows="27" cols="78" style="border:1px solid #000; margin: 0px 8px 0px 8px;">
</textarea>
</div>
<div id="canvas_full_list" style="display:none; background:#FFF; width:640px; height:50px; margin-left: 20px;">
Copy and paste the profile data below into an Excel spreadsheet or external text editor.
<input type="button" style="height:22px; font-size:10; margin-left:40px; margin-top: 6px;" value="Close" onClick="document.getElementById('canvas_full_list').style.display='none';document.getElementById('canvas_full_list_text').style.display='none';document.getElementById('canvas_profile_list').style.display='block';"></button>
</div>
<!-- holds the full profile list to be copied to the clipboard -->
<div id="canvas_full_list_text" style="display:none; width:640px; height:450px; color:#000; margin:0px 5px 0px 5px;">
<textarea id="canvas_full_list_textarea" rows="27" cols="78" style="border:1px solid #000; margin: 0px 8px 0px 8px;">
</textarea>
</div>
</div>
<!-- holds the visible profile details list -->
<div id="canvas_profile_list" style="display:none; margin-left:20px; height:463px; height:443px\9; width: 660px; overflow:auto;"></div>
<script type="text/javascript">
function init() {
// update UI
showToolVersion(true);
readIdsFromDB(displayProfileList);
readIdsFromDB(displayProfileList);
document.getElementById("canvas_profile_list").style.display="block";
$("a#create_group").click(function(event){
event.preventDefault();
$("div.message").addClass("hidden");
$("div.message").addClass("hidden");
$("div#create_group").removeClass("hidden");
});
});
$("input#close").click(function(event){
$("div#create_group").addClass("hidden");
});
$("input#create").click(function(event){
$("div.message").addClass("hidden");
$("div.message").addClass("hidden");
var name = $("div#create_group input#group_name").val();
var description = $("div#create_group #group_description").val();
if(name == null || name == '') {
showMessage("Please enter a group name.", true);
}
else {
else {
osapi.people.getViewer({ fields: ['id'] }).execute(function(result) {
var users = getUserList();
createGroup(name, description, getNodeIdFromURI(result.id), users);
});
});
}
});
$("#compose-email").click(function(event){
var emails = [];
var emailElem = $("td.email");
@ -602,8 +602,8 @@ var email = 'http://vivoweb.org/ontology/core#email';
event.preventDefault();
return false;
}
}
}
emailElem.each(function(index, elem) {
var email = $.trim($(elem).text());
if(email != '') {
@ -618,7 +618,7 @@ var email = 'http://vivoweb.org/ontology/core#email';
}
});
}
gadgets.util.registerOnLoadHandler(init);
</script>]]></Content>
</Module>
</Module>

View file

@ -11,7 +11,7 @@
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script type="text/javascript" src="js/prettyprint.js" ></script>
<script type="text/javascript">
// use pretty print!
function loadPeople() {
osapi.people.getViewer().execute(function(result) {
@ -41,7 +41,7 @@
});
}
function onLoadPeopleOsapi(person, divId) {
function onLoadPeopleOsapi(person, divId) {
html = new Array();
html.push('<ul>');
html.push('<li>You are looking at ' + person.displayName + '</li>');
@ -50,11 +50,11 @@
document.getElementById(divId).innerHTML = html.join('');
}
function onLoadPeopleRdf(person, divId) {
function onLoadPeopleRdf(person, divId) {
html = new Array();
html.push('<ul>');
html.push('<li>You are looking at ' + person.label + '</li>');
html.push('<li>Their URI is ' + (person.uri || person._about) + '</li>');
html.push('<li>Their URI is ' + (person.uri || person._about) + '</li>');
html.push('<li>Their email is ' + person.primaryEmail + '</li>');
html.push('</ul>');
var ppTable = prettyPrint(person);
@ -70,7 +70,7 @@
function submitform() {
var rdfurl = document.getElementById('rdfurl');
if (ndx == 0 || priorurl[ndx] != rdfurl.value) {
priorurl[ndx++] = rdfurl.value;
priorurl[ndx++] = rdfurl.value;
}
document.getElementById('rdf').innerHTML = '...fetching content...';
osapi.rdf.getRDF(rdfurl.value).execute(function(result) {
@ -107,4 +107,4 @@
<div id='rdf'></div>
</div> ]]>
</Content>
</Module>
</Module>

View file

@ -7,45 +7,45 @@
<Content type="html"><![CDATA[<!--HTML-->
<!-- #includes -->
<!DOCTYPE html>
<style>
.gadget_text {
font-family: Verdana, Arial;
font-size: 11px;
}
.gadgets-gadget-chrome {
margin-left: 8px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<pre><div id="content" class="gadget_text"></div></pre>
<script>
function parseXml(xml) {
function parseXml(xml) {
if (jQuery.browser.msie) {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.loadXML(xml);
xml = xmlDoc;
}
return xml;
}
}
function handleResponse(obj) {
var ids = [];
var theXML = obj.text;
// IE hack
theXML = parseXml(theXML);
theXML = parseXml(theXML);
// JB hack
$("#content").append( "Additional search results for " + gadgets.util.getUrlParameters()['keyword'] )
$("#content").append( "Additional search results for " + gadgets.util.getUrlParameters()['keyword'] )
gadgets.window.adjustHeight();
};

View file

@ -15,30 +15,30 @@
<Content type="html" view="default, home, profile" preferred_height="470" preferred_width="670"><![CDATA[<!--HTML-->
<!DOCTYPE html>
<base target="_blank"/>
<!-- TODO: Fix height for OSDE. Should be removed -->
<!-- TODO: Fix height for OSDE. Should be removed -->
<!--script type="text/javascript">
gadgets.window.adjustHeight(700);
</script-->
<!-- #includes -->
<link rel="stylesheet" href="css/gadget.css" type="text/css" media="screen, projection">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="js/os.js" ></script>
<!-- Styles -->
<style type="text/css">
.slideshare_title { font-family: Arial, helvetica; font-size: 14px;}
.slideshare_body { font-family: Arial, helvetica; font-size: 11px;}
.slideshare_body { font-family: Arial, helvetica; font-size: 11px;}
.slideshare_credit { font-family: Arial, helvetica; font-size: 10px;}
.ss-link{ margin:10px 0px 10px 0px; }
a, a:visited { color: #0088CC; text-decoration: none; }
a:hover { color: #005580; text-decoration: underline; }
</style>
<script type="text/javascript">
function gotoSlideshare() {
function gotoSlideshare() {
var action = 'go_to_slideshare';
var href = $('div.ss-link a').attr('href');
gadgets.pubsub.subscribe("analytics", function(sender, message){
@ -48,14 +48,14 @@
});
gadgetEventTrack(action, href);
}
function gadgetEventTrack(action, label, value) {
var message = {'action' : action};
if (label) {message.label = label;}
if (value) {message.value = value;}
gadgets.pubsub.publish("analytics", message);
}
// ========================================
function getUserNameAndPreview(userId){
osapi.appdata.get({'userId': userId, 'groupId': '@self', 'appId':'@app', 'fields': ['username']})
@ -65,15 +65,15 @@
$('input[name=username]').val(username);
if(username != null && username != "") { // only render flash if there's a username
preview(username);
}
}
});
}
// ========================================
// ========================================
function preview(username){
var url = "http://static.slidesharecdn.com/swf/multiwidget.swf";
$('#preview').html(
'<div style="width:577px;margin:auto;">' +
'<object style="margin:0px" width="600" height="428" ' +
@ -87,36 +87,36 @@
'<param name="flashVars" value="feedurl=user/'+ username + '&widgettitle=Slides%20by%20'+ username +'"/>' +
'<embed src="http://static.slidesharecdn.com/swf/multiwidget.swf" ' +
' name="slideshow" ' +
' flashVars="feedurl=user/'+ username + '&widgettitle=Slides%20by%20'+ username +'"' +
' flashVars="feedurl=user/'+ username + '&widgettitle=Slides%20by%20'+ username +'"' +
' type="application/x-shockwave-flash"' +
' pluginspage="http://www.adobe.com/go/getflashplayer"' +
' allowscriptaccess="always"' +
' allowfullscreen="true"' +
' pluginspage="http://www.adobe.com/go/getflashplayer"' +
' allowscriptaccess="always"' +
' allowfullscreen="true"' +
' width="600" ' +
' height="428">' +
'</embed>' +
'</object>' +
'<div class="ss-link">Having trouble seeing this? <a href="http://www.slideshare.net/'+ username + '" target="_top">View at SlideShare</a><div/>' +
'</div>'
);
);
$('div.ss-link a').click(function(event){
event.preventDefault();
gotoSlideshare();
}); //click
gotoSlideshare();
}); //click
}
// ========================================
// ========================================
gadgets.util.registerOnLoadHandler(function(){
var viewName=gadgets.views.getCurrentView().getName();
if(viewName=='home'){
var innerDiv=$('#inner_home_settings').html();
$('#settings').html(innerDiv);
$('#secondHeader').show();
getUserNameAndPreview('@viewer');
$('span.save').click(function(){
@ -124,7 +124,7 @@
osapi.appdata.update({'userId': '@viewer', 'groupId': '@self', 'appId':'@app', 'data':{'username':username} })
.execute(function(response){
});
$('#preview').html('');
if(username != null && username != "") {
preview(username);
@ -133,18 +133,18 @@
}
else{
getUserNameAndPreview('@owner');
}
}); // registerOnLoadHandler
}
}); // registerOnLoadHandler
// ========================================
</script>
<div id="secondHeader" style="display:none; margin:0px 10px 0px 10px;">
<span class="slideshare_title"><b>SlideShare: A great way to share presentations</b></span>
</div>
<div id="settings" style="clear:both; margin:0px 10px 0px 10px;">
<div id="settings" style="clear:both; margin:0px 10px 0px 10px;">
</div>
<br>
<div id="preview">
@ -152,18 +152,18 @@
<br><br>
]]>
</Content>
<Content type="html" view="home" preferred_height="670" preferred_width="700"><![CDATA[<!--HTML-->
<Content type="html" view="home" preferred_height="670" preferred_width="700"><![CDATA[<!--HTML-->
<div id="inner_home_settings" style="display:none;">
<p class="slideshare_body">
If you already have a SlideShare account and have uploaded presentations, simply follow these steps:<br>
</p>
<p class="slideshare_body" style="padding-left:20px;">
<ol>
<li class="slideshare_body">Enter your SlideShare Username below and click Save/Preview.
<li class="slideshare_body">Enter your SlideShare Username below and click Save/Preview.
Any public presentations that you've uploaded to SlideShare will be shown in the preview below.</li>
<li class="slideshare_body">Make sure these presentations are the ones you want to share on your profile.</li>
<li class="slideshare_body">Click the "Show" link (above, upper right) to make the presentations publicly available within your profile.</li>
<li class="slideshare_body">To remove the presentations, delete your SlideShare Username and click Save/Preview.
<li class="slideshare_body">To remove the presentations, delete your SlideShare Username and click Save/Preview.
Make sure to "Hide" your presentations from the public if you delete your SlideShare Username.</li>
</ol>
</p>
@ -172,11 +172,11 @@
&nbsp;&nbsp;&nbsp;</span>
<span class="save slideshare_body" style="text-decoration:underline;cursor:pointer;color:#44F; display:inline;" title="Save this Username and preview the presentations.">Save/Preview</span>
<br><br>
<span class="slideshare_body">Don't have a SlideShare account yet?
<span class="slideshare_body">Don't have a SlideShare account yet?
Go to <a href="http://www.slideshare.net" target="_blank" style="font-size:12px;text-decoration:none; cursor:pointer;color:#44F;" title="Go to the SlideShare Web site">
SlideShare</a> now to create an account and upload presentations.</span>
</div>
</div>
]]>
</Content>
</Module>
</Module>

View file

@ -12,14 +12,14 @@
<Require feature="dynamic-height" />
</ModulePrefs>
<Content type="html" view="default, home, profile"><![CDATA[<!--HTML-->
<!DOCTYPE html>
<!DOCTYPE html>
<!-- #includes -->
<link rel="stylesheet" href="css/gadget.css" type="text/css" media="screen, projection">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="js/jquery.blockUI.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="js/jquery.blockUI.js"></script>
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script type="text/javascript" src="js/os.js" ></script>
<script type="text/javascript">
var ucsf = ucsf || {};
ucsf.twitter = {};
@ -29,7 +29,7 @@
if (value) {message.value = value;}
gadgets.pubsub.publish("analytics", message);
};
ucsf.twitter.getUsername=function(callback) {
osapi.appdata.get({'userId': '@owner', 'groupId': '@self', 'appId':'@app', 'fields': ['twitter_username']})
.execute(function(response){
@ -40,12 +40,12 @@
}
});
}
ucsf.twitter.render=function(username) {
$("#twitter-wjs").remove();
$(".twitter-gadget .content").empty();
$(".twitter-gadget .content").append('<a width="520" height="300" class="twitter-timeline" href="https://twitter.com/'+username+'" data-screen-name="'+username+'" data-widget-id="320982656688996353">Tweets by @'+username+'</a>')
var fjs=document.getElementsByTagName("script")[0];
var p=/^http:/.test(document.location)?'http':'https';
js=document.createElement("script");
@ -53,41 +53,41 @@
js.src=p+"://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);
}
ucsf.twitter.preview=function(widget_id) {
if(widget_id) {
ucsf.twitter.render(widget_id);
}
}
}
}
</script>
]]></Content>
<Content type="html" view="profile" preferred_width="670"><![CDATA[<!--HTML-->
<Content type="html" view="profile" preferred_width="670"><![CDATA[<!--HTML-->
<script type="text/javascript">
ucsf.twitter.profilePageInit = function() {
gadgets.window.adjustHeight(300);
ucsf.twitter.getUsername(ucsf.twitter.preview);
}
gadgets.util.registerOnLoadHandler(ucsf.twitter.profilePageInit);
</script>
gadgets.util.registerOnLoadHandler(ucsf.twitter.profilePageInit);
</script>
<!-- Styles -->
<style type="text/css">
.twitter-gadget .content {text-align: center;}
<style type="text/css">
.twitter-gadget .content {text-align: center;}
</style>
<div class="twitter-gadget">
<div class="content">
</div>
</div>
</div>
]]></Content>
<Content type="html" view="home" preferred_width="700"><![CDATA[<!--HTML-->
<script type="text/javascript">
<Content type="html" view="home" preferred_width="700"><![CDATA[<!--HTML-->
<script type="text/javascript">
$(document).ready(function () {
$(".twitter-gadget .save").click(function() {
$(".twitter-gadget").block({ message: "Saving..." });
osapi.appdata.update({'userId': '@owner', 'groupId': '@self', 'appId':'@app', 'data':{'twitter_username':$('.twitter-gadget input').val()} }).execute(function(response){
$(".twitter-gadget").unblock();
});
});
});
$(".twitter-gadget .preview").click(function() {
var username = $('.twitter-gadget input').val();
@ -102,7 +102,7 @@
}
});
});
ucsf.twitter.homePageInit = function() {
gadgets.window.adjustHeight(50);
ucsf.twitter.getUsername(function(username) {
@ -110,24 +110,24 @@
$('.twitter-gadget .content').show();
gadgets.window.adjustHeight(350);
ucsf.twitter.preview(username);
});
});
}
gadgets.util.registerOnLoadHandler(ucsf.twitter.homePageInit);
gadgets.util.registerOnLoadHandler(ucsf.twitter.homePageInit);
</script>
<!-- Styles -->
<style type="text/css">
.twitter-gadget {margin-top: 10px;}
<style type="text/css">
.twitter-gadget {margin-top: 10px;}
.twitter-gadget input {width: 400px;}
.twitter-gadget .label {margin-right: 10px;font-weight: bold;}
.twitter-gadget .preview, .twitter-gadget .save {margin-left: 10px;color: #3B6394; cursor:pointer;}
.twitter-gadget .content {margin-top: 10px; margin-left: 20px;}
.twitter-gadget .content {margin-top: 10px; margin-left: 20px;}
</style>
<div class="twitter-gadget">
<div class="twitter-gadget">
<span class="label">Widget Id:</span><input type="text" name="keywords"></input><span class="preview">Preview</span><span class="save">Save</span>
<div class="content" style="display:none">
<div class="content" style="display:none">
</div>
</div>
]]></Content>
</Module>
</Module>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="2.5"
<web-app
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
</web-app>
</web-app>

View file

@ -104,23 +104,23 @@ DROP PROCEDURE IF EXISTS `orng_registerAppPerson`;
DROP PROCEDURE IF EXISTS `orng_upsertAppData`;
DROP PROCEDURE IF EXISTS `orng_deleteAppData`;
DELIMITER //
DELIMITER //
CREATE PROCEDURE orng_registerAppPerson (uid varchar(255), aid INT, v BOOL)
BEGIN
IF (v)
THEN
INSERT INTO orng_app_registry (appId, personId, createdDT) values (aid, uid, now());
ELSE
ELSE
DELETE FROM orng_app_registry where appId = aid AND personId = uid;
END IF;
END //
DELIMITER ;
END IF;
END //
DELIMITER ;
DELIMITER //
DELIMITER //
CREATE PROCEDURE orng_upsertAppData(uid varchar(255), aid INT, kn varchar(255),v varchar(4000))
BEGIN
DECLARE cnt int;
SELECT count(*) FROM orng_appdata WHERE userId = uid AND appId = aid and keyname = kn INTO cnt;
SELECT count(*) FROM orng_appdata WHERE userId = uid AND appId = aid and keyname = kn INTO cnt;
IF (cnt > 0)
THEN
UPDATE orng_appdata set `value` = v, updatedDT = NOW() WHERE userId = uid AND appId = aid and keyname = kn;
@ -128,26 +128,26 @@ BEGIN
INSERT INTO orng_appdata (userId, appId, keyname, `value`) values (uid, aid, kn, v);
END IF;
-- if keyname is VISIBLE, do more
IF (kn = 'VISIBLE' AND v = 'Y')
IF (kn = 'VISIBLE' AND v = 'Y')
THEN
CALL orng_registerAppPerson(uid, aid, 1);
ELSEIF (kn = 'VISIBLE' )
THEN
CALL orng_registerAppPerson(uid, aid, 0);
END IF;
END //
DELIMITER ;
END //
DELIMITER ;
DELIMITER //
DELIMITER //
CREATE PROCEDURE orng_deleteAppData(uid varchar(255), aid INT, kn varchar(255))
BEGIN
DELETE FROM orng_appdata WHERE userId = uid AND appId = aid and keyname = kn;
-- if keyname is VISIBLE, do more
IF (kn = 'VISIBLE' )
IF (kn = 'VISIBLE' )
THEN
CALL orng_registerAppPerson(uid, aid, 0);
END IF;
END //
END //
DELIMITER ;

View file

@ -9,20 +9,20 @@ additions-to-solr-war contains files that will be are merged into the war by the
log4j-1.2.16.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
The Solr WAR file does not include logging JARs, assuming that they will be provided
by the supporting container: Tomcat or equivalent. But we want the WAR to be
self-contained, so we provide the JARs. We also want to reduce the amount of logging
The Solr WAR file does not include logging JARs, assuming that they will be provided
by the supporting container: Tomcat or equivalent. But we want the WAR to be
self-contained, so we provide the JARs. We also want to reduce the amount of logging
messages, so we provide a log4j.properties.
jts-1.13.jar
Don't know.
template.context.xml is the basis for a Tomcat context fragment. The build script will
modify this so it provides a JNDI reference to the Solr home directory, and disables
modify this so it provides a JNDI reference to the Solr home directory, and disables
persistence across Tomcat restarts.
Non-Tomcat containers will likely ignore this.
homeDirectoryTemplate is a modified version of the example home directory provided by Solr.
Don't know what those modifications are, but they certainly include our own version of
conf/schema.xml.

View file

@ -11,7 +11,7 @@ The list of JARs should be created by running the jarlist target of the build fi
That will use JarJar to create a list of JAR file that are not directly referenced
by the classes in the build. But what about JARs that are needed by a call using
reflection? Like Class.forName("this.that.theOther"). We know this is how the MySQL
driver is loaded (so we need mysql-connector-java-5.1.16-bin.jar). Are there any
driver is loaded (so we need mysql-connector-java-5.1.16-bin.jar). Are there any
others? This script will try to find them.
The jarlist target includes a list of JARs that we know are needed, such as the MySQL
@ -20,7 +20,7 @@ list, and the target run again, in case they depend on other JARs in turn.
--------------------------------------------------------------------------------
One of the tricks that this script uses is to prune the list of packages to
One of the tricks that this script uses is to prune the list of packages to
search for. If a JAR contains both "this.that.other" and "this.that", then we
only need to search for "this.that", since it will reveal uses of "this.that.other"
as well.
@ -28,24 +28,24 @@ as well.
--------------------------------------------------------------------------------
pass the name of the file that contains the JAR names
pass the root directory of the combined vitro/vivo distro
pass the root directory of the combined vitro/vivo distro
(appbase)
--------------------------------------------------------------------------------
Search all of the *.java, *.jsp, *.js, *.tld, *.xml files for mention of these package names
For each hit, print the file path, line number, the package name and the JAR name.
To search files:
find -X . -name \*.db -or -name \*pot | xargs grep 'org\.package\.name'
grep -H -n -f file_with_package_patterns
or can we do this all with grep on each string?
grep -r --include=*.jsp
grep -H -n -r --include=*.javaxd --include=*.jsp org\.package\.name .
and precede the output with a header that lists the package
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
=end
@ -121,7 +121,7 @@ def print_package_names_for_jars
package_array.each do |package_name|
puts " #{package_name}"
end
puts
puts
end
end
@ -172,9 +172,9 @@ if File.expand_path($0) == File.expand_path(__FILE__)
if ARGV.length != 2
raise("usage is: ruby jarUsageScanner.rb <jar_names_file> <scan_base_directory>")
end
@jar_names_file, @scan_base_directory = ARGV
if !File.file?(@jar_names_file)
raise "File does not exist: '#{@jar_names_file}'."
end
@ -184,9 +184,9 @@ if File.expand_path($0) == File.expand_path(__FILE__)
end
print_args
figure_package_names_from_jars
print_package_names_for_jars
show_packages_in_source_files
end
end

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
/**
* This class is created to work around a known bug in JarJar which did not get fixed in release 1.1.
* See the comments in edu.cornell.mannlib.vitro.utilities.jarlist.JarLister
*/

View file

@ -38,34 +38,34 @@ import org.xml.sax.SAXException;
/**
* Look at web.xml, and check for conditions that violate the Servlet 2.4 spec,
* but that might not be noticed because Tomcat doesn't complain.
*
*
* ------
*
*
* Values of the <dispatcher/> tag:
*
*
* The spec permits only these values: "FORWARD", "REQUEST", "INCLUDE", "ERROR",
* but Tomcat also allows the lower-case equivalents. GlassFish or WebLogic will
* barf on lower-case.
*
*
* Check to see that only the upper-case values are used.
*
*
* ------
*
*
* Existence of Servlet classes:
*
*
* The spec allows the container to either load all servlets at startup, or to
* load them when requested. Since Tomcat only loads servlet when requested, it
* doesn't notice or complain if web.xml cites a <servlet-class/> that doesn't
* exist, as long as it is never invoked. On the other hand, WebLogic loads all
* serlvets at startup, and will barf if the class is not found.
*
*
* Check each <servlet-class/> to insure that the class can be loaded and
* instantiated and assigned to HttpServlet.
*
*
* ------
*
*
* Embedded URIs in taglibs.
*
*
* I can't find this definitively in the JSP spec, but some containers complain
* if web.xml specifies a <taglib-uri/> that conflicts with the <uri/> embedded
* in the taglib itself. As far as I can see in the spec, the embedded <uri/>
@ -73,51 +73,51 @@ import org.xml.sax.SAXException;
* "Implicit Map Entries From TLDs", which in turn is only relevant for TLDs
* packaged in JAR files. So, I can't find support for this complaint, but it
* seems a reasonable one.
*
*
* Check each <taglib/> specified in web.xml. If the taglib has an embedded
* <uri/> tag, it should match the <taglib-uri/> from web.xml.
*
*
* ------
*
*
* Existence of Listener and Filter classes.
*
*
* As far as I can tell, there is no ambiguity here, and every container will
* complain if any of the <listener-class/> or <filter-class/> entries are
* unsuitable. I check them anyway, since the mechanism was already assembled
* for checking <servlet-class/> entries.
*
*
* Check each <listener-class/> to insure that the class can be loaded and
* instantiated and assigned to ServletContextListener.
*
*
* Check each <filter-class/> to insure that the class can be loaded and
* instantiated and assigned to Filter.
*
*
* ------
*
*
* A <servlet/> tag for every <servlet-mapping/> tag
*
*
* I can't find a mention of this in the spec, but Tomcat complains and refuses
* to load the app if there is a <servlet-mapping/> tag whose <servlet-name/> is
* not matched by a <servlet-name/> in a <servlet/> tag.
*
*
* Get sets of all <servlet-name/> tags that are specified in <servlet/> and
* <servlet-mapping/> tags. There should not be any names in the
* servlet-mappings that are not in the servlets.
*
*
* ---------------------------------------------------------------------
*
*
* Although this class is executed as a JUnit test, it doesn't have the usual
* structure for a unit test.
*
*
* In order to produce the most diagnostic information, the test does not abort
* on the first failure. Rather, failure messages are accumulated until all
* checks have been performed, and the test list all such messages on failure.
*
*
* ---------------------------------------------------------------------
*
*
* Since this is not executed as part of the standard Vitro unit tests, it also
* cannot use the standard logging mechanism. Log4J has not been initialized.
*
*
*/
public class CheckContainerNeutrality {
private static final String PROPERTY_WEBAPP_DIR = "CheckContainerNeutrality.webapp.dir";

View file

@ -24,23 +24,23 @@ import com.tonicsystems.jarjar.KlugedDepFind;
/**
* This takes the place of the JarJar main routine, in doing a Find operation.
*
*
* One thing this lets us do is to call KlugedDepFind instead of DepFind.
* KlugedDepFind was created because JarJar had a known bug that wasn't fixed in
* the latest release. (see http://code.google.com/p/jarjar/issues/detail?id=6).
* I had to put KlugedDepFind into the com.tonicsystems.jarjar package so it
* wauld have access to DepFindVisitor, which is package-private.
*
*
* The other thing we can do is to provide a custom DepHandler which records the
* dependencies directly instead of writing them to a file which we would need
* to parse. Since we have the dependencies in a data structure, it's easy to
* walk the tree and find out what JARs are required, even through several
* layers of dependency.
*
*
* When calling this, pass 2 arguments. The first is the path to the JAR which
* contains the Vitro (or VIVO) classes. The second is the path to the directory
* that contains the JARs. (shouldn't end with a slash)
*
*
* There is a list of JARs which we know we need but which aren't shown by the
* analysis. For example, the MySQL driver is loaded dynamically by name, so an
* analysis of the class files in the JARs won't show that it is used. For now,
@ -50,9 +50,9 @@ import com.tonicsystems.jarjar.KlugedDepFind;
public class JarLister {
/**
* <pre>
*
*
* What I originally wanted to do was this:
*
*
* <target name="jarlist" depends="jar" description="Figure out what JARs are needed">
* <java classname="com.tonicsystems.jarjar.Main" fork="no" failonerror="true">
* <classpath refid="utility.run.classpath" />
@ -62,9 +62,9 @@ public class JarLister {
* <arg value="${appbase.dir}/lib/*" />
* </java>
* </target>
*
*
* I ended up with this instead:
*
*
* <target name="jarlist" depends="jar" description="Figure out what JARs are needed">
* <java classname="edu.cornell.mannlib.vitro.utilities.jarlist.JarLister" fork="no" failonerror="true">
* <classpath refid="utility.run.classpath" />
@ -73,7 +73,7 @@ public class JarLister {
* <arg value="${appbase.dir}/config/jarlist/known_dependencies.txt" />
* </java>
* </target>
*
*
* </pre>
*/

View file

@ -12,9 +12,9 @@ import java.util.Map;
/**
* A harness that runs a system-level command.
*
*
* No provision is made for standard input.
*
*
* The standard output and standard error streams are asynchronously read, so
* the sub-process will not block on full buffers. Warning: if either of these
* streams contain more data than can fit into a String, then we will have a
@ -40,7 +40,7 @@ public class ProcessRunner {
/**
* Run the command.
*
*
* @param command
* a list containing the operating system program and its
* arguments. See

View file

@ -17,15 +17,15 @@ import edu.cornell.mannlib.vitro.utilities.revisioninfo.ProcessRunner.ProcessExc
/**
* Get release and revision information to display on screen. Put this
* information into a single line and append it to the specified file.
*
*
* Ask Git for the information. If Git is available, and if this is a working
* directory, then we can build the info from the responses we get from
* "git describe", "git symbolic-ref" and "git log".
*
*
* If that doesn't work, read the information from the "revisionInfo" file in
* the product directory. Presumably, that file was created when the source was
* exported from Git.
*
*
* If that doesn't work either, return something like this:
* "productName ~ unknown ~ unknown"
*/
@ -123,7 +123,7 @@ public class RevisionInfoBuilder {
if (revision == null) {
System.out.println("Couldn't get commit ID from Git");
}
if ((revision == null) && (release == null)) {
return null;
}

View file

@ -25,10 +25,10 @@ import edu.cornell.mannlib.vitro.utilities.testing.VitroTestRunner.ReportLevel;
* Listen to events as they come from the JUnit test runner. The events from the
* lifecycle methods are broken down into semantic chunks and executed. Three
* levels of output are available.
*
*
* On the surface, JUnit treats "failures" (failed assertions) the same as
* "errors" (unexpected exceptions). We're going to distinguish between them.
*
*
* @author jeb228
*/
public class VitroTestRunListener extends RunListener {
@ -303,10 +303,10 @@ public class VitroTestRunListener extends RunListener {
/**
* Trim the stack trace: don't show the line saying "23 more", and don't
* show the lines about org.junit or java.lang.reflect or sun.reflect.
*
*
* Once we hit some "client code", we won't trim any futher lines even if
* they belong to org.junit, or the others.
*
*
* If we have nested exceptions, the process repeats for each "Caused by"
* section.
*/

View file

@ -16,7 +16,7 @@ import org.junit.runner.JUnitCore;
* It runs the tests with a variety of reporting detail, depending on the level
* selected. If the level selector is absent or unrecognized, the medium level
* is used.
*
*
* @author jeb228
*/
public class VitroTestRunner {

View file

@ -55,7 +55,7 @@ public class RdbMigrator {
/**
* Confirm all of the parameters. Ask the user for approval. Do the
* migration.
*
*
* @throws UserDeclinedException
* If the user decides not to continue.
*/

View file

@ -3,17 +3,17 @@ A tool to convert triples from SDB to TDB.
Unlike the RDF-migration tool, this tool is not tied to the VIVO
properties files. Instead, you must provide:
* The URL for the SDB, including username and password parameters
* The directory path for the TDB.
The directory must exist.
* The directory path for the TDB.
The directory must exist.
The directory must be empty, unless the "force" optiopn is used.
Examples:
java -jar sdb2tdb.jar \
jdbc:mysql://localhost/vitrodb?user=vivoUser&password=vivoPass \
java -jar sdb2tdb.jar \
jdbc:mysql://localhost/vitrodb?user=vivoUser&password=vivoPass \
/usr/local/my/tdb
java -Xms512m -Xmx4096m -jar .work/sdb2tdb.jar \
'jdbc:mysql://localhost/weill17?user=vivoUser&password=vivoPass' \
/Users/jeb228/Testing/instances/weill-develop/vivo_home/contentTdb \
force
force

View file

@ -40,25 +40,25 @@ import org.apache.jena.tdb.TDBFactory;
/**
* Copy all of the data from an SDB triple-store to a TDB triple-store. See
* README.txt for more details.
*
*
* Examples of invoking it:
*
*
* <pre>
* java -jar sdb2tdb.jar \
* 'jdbc:mysql://localhost/vitrodb?user=vivoUser&password=vivoPass'\
* java -jar sdb2tdb.jar \
* 'jdbc:mysql://localhost/vitrodb?user=vivoUser&password=vivoPass'\
* /usr/local/my/tdb
*
*
* java -Xms2048m -Xmx2048m -jar .work/sdb2tdb.jar \
* 'jdbc:mysql://localhost/weill17?user=vivoUser&password=vivoPass' \
* /Users/jeb228/Testing/instances/weill-develop/vivo_home/contentTdb \
* force
* </pre>
*
*
* Each graph is copied separately. Small graphs are simply loaded into memory
* and transferred. Large graphs are read to produce a streaming result set
* which is written to a temporary file. That file is then read into a TDB
* model.
*
*
* This has been tested with graphs up to 6 million triples without crashing.
*/
public class Sdb2Tdb {

View file

@ -226,22 +226,22 @@ public class SolrConfigTester {
/**
* TODO
*
*
* <pre>
* // ** Let's index a document into our embedded server
*
*
* SolrInputDocument newDoc = new SolrInputDocument();
* newDoc.addField(&quot;title&quot;, &quot;Test Document 1&quot;);
* newDoc.addField(&quot;id&quot;, &quot;doc-1&quot;);
* newDoc.addField(&quot;text&quot;, &quot;Hello world!&quot;);
* server.add(newDoc);
* server.commit();
*
*
* // ** And now let's query for it
*
*
* params.set(&quot;q&quot;, &quot;title:test&quot;);
* QueryResponse qResp = server.query(params);
*
*
* SolrDocumentList docList = qResp.getResults();
* System.out.println(&quot;Num docs: &quot; + docList.getNumFound());
* SolrDocument doc = docList.get(0);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
@ -14,8 +14,8 @@
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Admin</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#ADMIN"/>
</auth:UserAccount>
@ -26,8 +26,8 @@
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Curator</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#CURATOR"/>
</auth:UserAccount>
@ -38,8 +38,8 @@
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Editor</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#EDITOR"/>
</auth:UserAccount>
@ -50,8 +50,8 @@
<auth:lastName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">User</auth:lastName>
<auth:md5password rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DC647EB65E6711E155375218212B3964</auth:md5password>
<auth:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ACTIVE</auth:status>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:loginCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</auth:loginCount>
<auth:passwordLinkExpires rdf:datatype="http://www.w3.org/2001/XMLSchema#long">0</auth:passwordLinkExpires>
<auth:hasPermissionSet rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/authorization#SELF_EDITOR"/>
</auth:UserAccount>

View file

@ -4,14 +4,14 @@
#
# This file is provided as example.build.properties.
#
# Save a copy of this file as build.properties, and edit the properties as
# Save a copy of this file as build.properties, and edit the properties as
# needed for your installation.
#
# -----------------------------------------------------------------------------
#
# The base install directory for your Tomcat server. The Vitro application
# will be deployed in the /webapps directory below this base.
# The base install directory for your Tomcat server. The Vitro application
# will be deployed in the /webapps directory below this base.
#
tomcat.home = /usr/local/tomcat
@ -33,4 +33,4 @@ vitro.home = /usr/local/vitro/home
# here must appear as sub-directories of [vivo]/languages in the distribution.
# Find more information on the VIVO Wiki (https://wiki.duraspace.org/display/VIVO).
#
#languages.addToBuild =
#languages.addToBuild =

View file

@ -4,25 +4,25 @@
#
# This file is provided as example.runtime.properties.
#
# Save a copy of this file as runtime.properties in your Vitro home directory,
# Save a copy of this file as runtime.properties in your Vitro home directory,
# and edit the properties as needed for your installation.
#
# -----------------------------------------------------------------------------
#
# This namespace will be used when generating URIs for objects created in the
# editor. In order to serve linked data, the default namespace must be composed
#
# This namespace will be used when generating URIs for objects created in the
# editor. In order to serve linked data, the default namespace must be composed
# as follows (optional elements in parentheses):
#
# scheme + server_name (+ port) (+ servlet_context) + "/individual/"
#
#
# For example, Cornell's default namespace is:
#
# http://vivo.cornell.edu/individual/
#
Vitro.defaultNamespace = http://vivo.mydomain.edu/individual/
#
#
# URL of Solr context used in local Vitro search. This will usually consist of:
# scheme + server_name + port + vitro_webapp_name + "solr"
# In the standard installation, the Solr context will be on the same server as Vitro,
@ -33,7 +33,7 @@ Vitro.defaultNamespace = http://vivo.mydomain.edu/individual/
vitro.local.solr.url = http://localhost:8080/vitrosolr
#
# Email parameters which VIVO can use to send mail. If these are left empty,
# Email parameters which VIVO can use to send mail. If these are left empty,
# the "Contact Us" form will be disabled and users will not be notified of
# changes to their accounts.
#
@ -41,8 +41,8 @@ email.smtpHost = smtp.my.domain.edu
email.replyTo = vivoAdmin@my.domain.edu
#
# The basic parameters for a MySQL database connection. Change the end of the
# URL to reflect your database name (if it is not "vitro"). Change the username
# The basic parameters for a MySQL database connection. Change the end of the
# URL to reflect your database name (if it is not "vitro"). Change the username
# and password to match the authorized user you created in MySQL.
#
VitroConnection.DataSource.url = jdbc:mysql://localhost/vitro
@ -63,7 +63,7 @@ VitroConnection.DataSource.pool.maxActive = 40
VitroConnection.DataSource.pool.maxIdle = 10
#
# Parameters to change in order to use VIVO with a database other than
# Parameters to change in order to use VIVO with a database other than
# MySQL.
#
VitroConnection.DataSource.dbtype = MySQL
@ -71,8 +71,8 @@ VitroConnection.DataSource.driver = com.mysql.jdbc.Driver
VitroConnection.DataSource.validationQuery = SELECT 1
#
# The email address of the root user for the VIVO application. The password
# for this user is initially set to "rootPassword", but you will be asked to
# The email address of the root user for the VIVO application. The password
# for this user is initially set to "rootPassword", but you will be asked to
# change the password the first time you log in.
#
rootUser.emailAddress = root@myDomain.com
@ -94,7 +94,7 @@ argon2.memory = 1024
argon2.time = 1000
#
# How is a logged-in user associated with a particular Individual? One way is
# How is a logged-in user associated with a particular Individual? One way is
# for the Individual to have a property whose value is the username of the user.
# This is the name of that property.
#
@ -104,11 +104,11 @@ selfEditing.idMatchingProperty = http://vitro.mydomain.edu/ns#networkId
# If an external authentication system like Shibboleth or CUWebAuth is to be
# used, these properties say how the login button should be labeled, and which
# HTTP header will contain the user ID from the authentication system. If such
# as system is not to be used, leave these commented out. Consult the
# installation instructions for more details.
# as system is not to be used, leave these commented out. Consult the
# installation instructions for more details.
#
#externalAuth.buttonText = Log in using BearCat Shibboleth
#externalAuth.netIdHeaderName = remote_userID
#externalAuth.netIdHeaderName = remote_userID
#
# Types of individual for which we can create proxy editors.
@ -116,39 +116,39 @@ selfEditing.idMatchingProperty = http://vitro.mydomain.edu/ns#networkId
proxy.eligibleTypeList = http://www.w3.org/2002/07/owl#Thing
#
# Show only the most appropriate data values based on the Accept-Language
# Show only the most appropriate data values based on the Accept-Language
# header supplied by the browser. Default is false if not set.
#
# RDFService.languageFilter = true
#
# Tell VIVO to generate HTTP headers on its responses to facilitate caching the
# profile pages that it creates.
# Tell VIVO to generate HTTP headers on its responses to facilitate caching the
# profile pages that it creates.
#
# For more information, see
# For more information, see
# https://wiki.duraspace.org/display/VIVO/Use+HTTP+caching+to+improve+performance
#
# Developers will likely want to leave caching disabled, since a change to a
# Freemarker template or to a Java class would not cause the page to be
# Freemarker template or to a Java class would not cause the page to be
# considered stale.
#
# http.createCacheHeaders = true
#
# Force VIVO to use a specific language or Locale instead of those
# specified by the browser. This affects RDF data retrieved from the model,
# Force VIVO to use a specific language or Locale instead of those
# specified by the browser. This affects RDF data retrieved from the model,
# if RDFService.languageFilter is true. This also affects the text of pages
# that have been modified to support multiple languages.
# that have been modified to support multiple languages.
#
# languages.forceLocale = en_US
#
# A list of supported languages or Locales that the user may choose to
# use instead of the one specified by the browser. Selection images must
# be available in the i18n/images directory of the theme. This affects
# RDF data retrieved from the model, if RDFService.languageFilter is true.
# This also affects the text of pages that have been modified to support
# multiple languages.
# be available in the i18n/images directory of the theme. This affects
# RDF data retrieved from the model, if RDFService.languageFilter is true.
# This also affects the text of pages that have been modified to support
# multiple languages.
#
# This should not be used with languages.forceLocale, which will override it.
#

View file

@ -1,10 +1,10 @@
#
# A list of JARs that we know to be required by the source code (and notes on where they are required).
#
# The "jarlist" target of the build script will work on the assumption that these JARs and any JARs
# The "jarlist" target of the build script will work on the assumption that these JARs and any JARs
# that they depend on are required by the app.
#
# For example, the JDBC drivers are never explicitly included, but instead are invoked using Class.forName(),
# For example, the JDBC drivers are never explicitly included, but instead are invoked using Class.forName(),
# so they are required even though the "jarlist" target won't find any such requirement.
#

View file

@ -1,8 +1,8 @@
#
# A list of files and directories that are known exceptions to the
# A list of files and directories that are known exceptions to the
# license-insertion process.
#
# Files will only be altered if they contain a "magic" license place-holder,
# Files will only be altered if they contain a "magic" license place-holder,
# but if they match one of the file-matchers and don't contain a place-holder,
# the process will write a warning.
#
@ -96,7 +96,7 @@ webapp/web/src/rpc/*
webapp/web/src/selection/*
webapp/web/src/storage/*
webapp/web/src/storage.js
webapp/web/src/string/*
webapp/web/src/string/*
webapp/web/src/string.js
webapp/web/src/style.js
webapp/web/src/svg.js

View file

@ -1,14 +1,14 @@
# --------------------------------------------------------------------------
# Properties for running the licenser utility in Vitro core.
# --------------------------------------------------------------------------
# The path to the top level directory to be scanned or copied
# (if relative, then relative to this file)
source_dir = ../../../
# The path to the top level directory to copy into (ignored if only scanning)
# (if relative, then relative to this file)
target_dir =
target_dir =
# A list of filename globs that match the files we want to license,
# delimited by commas with optional white-space.
@ -18,9 +18,9 @@ file_matchers = *.java, *.jsp, *.tld, *.xsl, *.xslt, *.css, *.js, *.ftl, *.xml
# (relative to the source_dir)
skip_directories = ./bin, ./.svn, ./**/.svn, ./webapp/.build
# The path to a file containing filename/path globs that match the files that
# we know should have no license tags in them.
# The file contains one glob per line; blank lines and comments ("#") are ignored.
# The path to a file containing filename/path globs that match the files that
# we know should have no license tags in them.
# The file contains one glob per line; blank lines and comments ("#") are ignored.
# (if relative, then relative to the source directory)
known_exceptions = webapp/config/licenser/known_exceptions.txt

View file

@ -2,7 +2,7 @@
# This file sets the log levels for the Vitro webapp.
#
# There are 8 principal logging levels, as follows:
# <-- more messages ALL TRACE DEBUG INFO WARN ERROR FATAL OFF fewer messages -->
# <-- more messages ALL TRACE DEBUG INFO WARN ERROR FATAL OFF fewer messages -->
#
# The default logging level is specified on the rootLogger. Other levels can be
# set for individual classes or packages as desired.
@ -22,7 +22,7 @@
#
# The "production" version of this file is log4j.properties.
# debug.log4j.properties exists will be used instead, if it exists, but is not stored in Subversion.
log4j.appender.AllAppender=org.apache.log4j.RollingFileAppender
log4j.appender.AllAppender.File= $${catalina.base}/logs/${webapp.name}.all.log
log4j.appender.AllAppender.MaxFileSize=10MB

View file

@ -1,7 +1,7 @@
<Context>
<!-- $This file is distributed under the terms of the license in LICENSE$ -->
<!--
Disable the attempt to persist sessions when Tomcat shuts down.
Disable the attempt to persist sessions when Tomcat shuts down.
-->
<Manager pathname="" />
</Context>

View file

@ -76,7 +76,7 @@ imageUpload.errorUnrecognizedFileType = ''{0}'' no es un tipo de archivo de imag
imageUpload.errorNoPhotoSelected = Por favor, busque y seleccione una foto.
imageUpload.errorBadMultipartRequest = Error al analizar la solicitud de varias partes para subir una imagen.
imageUpload.errorFormFieldMissing = El formulario no contiene a {0} ''campo'' ".
#
# User Accounts pages
#

View file

@ -6,7 +6,7 @@
<a href="#" onClick="history.back();return false;" title="regresar a los resultados">regresar a los resultados</a>
</span>
<#else>
<h3>Consejos Para la Búsqueda</h3>
<h3>Consejos Para la Búsqueda</h3>
</#if>
<ul class="searchTips">
<li>Debe ser sencillo. Utilice corto, único a menos que las búsquedas están regresando muchos resultados.</li>
@ -14,30 +14,30 @@
<li>A excepción de los operadores booleanos, búsquedas <strong>no distinguen</strong> entre mayúsculas y minúsculas, por lo que "Ginebra" y "ginebra" son equivalentes</li>
<li>Si no está seguro de la ortografía correcta, ponga ~ al final de su término de búsqueda -- por ejemplo, <i>cabage~</i> encuentra <i>cabbage</i>, <i>steven~</i> encuentra <i>Stephen</i> y <i>Stefan</i> (así como otros nombres similares).</li>
</ul>
<h4><a id="advTipsLink" href="#">Consejos Avanzados</a></h4>
<h4><a id="advTipsLink" href="#">Consejos Avanzados</a></h4>
<ul id="advanced" class="searchTips" style="visibility:hidden">
<li>Cuando se introduce más de un término, la búsqueda devolverá resultados que contengan todas ellas a menos que agregue el operador booleano "OR" -- por ejemplo, <i>pollo</i> OR <i>huevos</i>.</li>
<li>"NOT" puede ayudar búsquedas límite -- por ejemplo, <i>clima</i> NOT <i>cambiar</i>.</li>
<li>Las búsquedas de frases se pueden combinar con operadores booleanos -- por exemplo, "<i>cambio climático</i>" OR "<i>calentamiento global</i>".</li>
<li>Asimismo, se encuentra cerca variaciones de palabras -- por exemplo, <i>secuencia</i> emparejas <i>secuencias</i> y <i>secuenciación</i>.</li>
<li>Utilice el carácter comodín * para que coincida con una variación aún mayor -- por exemplo, <i>nano*</i> emparejas <i>nanotechnology</i> y <i>nanofabrication</i>.</li>
<li>Search utiliza versiones acortadas de palabras -- por exemplo, una búsqueda de "cogni*" no encuentra nada, mientras que la "cogn*" encuentra tanto <i>cognitivo</i> and <i>cognición</i>.</li>
<li>Search utiliza versiones acortadas de palabras -- por exemplo, una búsqueda de "cogni*" no encuentra nada, mientras que la "cogn*" encuentra tanto <i>cognitivo</i> and <i>cognición</i>.</li>
</ul>
<a id="closeLink" href="#" style="visibility:hidden;font-size:.825em;padding-left:8px">Close</a>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/search.css" />')}
<script type="text/javascript">
$(document).ready(function(){
$('a#advTipsLink').click(function() {
$('ul#advanced').css("visibility","visible");
$('ul#advanced').css("visibility","visible");
$('a#closeLink').css("visibility","visible");
$('a#closeLink').click(function() {
$('ul#advanced').css("visibility","hidden");
$('ul#advanced').css("visibility","hidden");
$('a#closeLink').css("visibility","hidden");
return false;
});
return false;
});
});
</script>
</script>

View file

@ -2,22 +2,22 @@
<section id="terms" role="region">
<h2>Condiciones de uso</h2>
<h3>Aviso legal</h3>
<p>Este ${termsOfUse.siteName} sitio web contiene material&mdash;información de texto, la publicación
citas, enlaces e imágenes&mdash;proporcionado por ${termsOfUse.siteHost} y varios terceros, tanto de los
individuos y las organizaciones, comerciales y de otro tipo. En la medida de derecho de autor, la información
presentada en el sitio web VIVO y disponible como Resource Description Framework (RDF) datos de VIVO en
${termsOfUse.siteHost} se destina para uso público y se distribuye libremente bajo los términos de la
${termsOfUse.siteHost} se destina para uso público y se distribuye libremente bajo los términos de la
<a href="http://creativecommons.org/licenses/by/3.0/" target="_blank" title="creative commons">Creative Commons
CC-BY 3.0</a> licencia, que le permite copiar, distribuir, mostrar y hacer que los derivados de esta
información, siempre le das crédito a ${termsOfUse.siteHost}. Cualquier información que no sea derecho de autor
está disponible para usted en virtud de una
está disponible para usted en virtud de una
<a href="http://creativecommons.org/publicdomain/zero/1.0/" target="_blank" title="cco waiver">exención
CC0</a>. Sin embargo, los documentos originales, imágenes o páginas web adjuntas o vinculado desde VIVO podrán
contener información con derechos de autor y sólo deben ser utilizados o distribuidos en los términos que se
incluyen con cada fuente o de acuerdo con los principios del uso justo.</p>
incluyen con cada fuente o de acuerdo con los principios del uso justo.</p>
<h3>Descargo de responsabilidad</h3>
@ -28,14 +28,14 @@
${termsOfUse.siteHost?cap_first} renuncia a cualquier garantía con respecto a la información proporcionada. Si
usted confía en dicha información es a su propio riesgo. En ningún caso ${termsOfUse.siteHost} será responsable
ante usted por daños o pérdidas que resulten de o causados por el sitio web ${termsOfUse.siteName} o su
contenido.</p>
contenido.</p>
<h3>Renuncia de aprobación</h3>
<p>La referencia en este documento a cualquier producto comercial específico, proceso o servicio por nombre
comercial, marca, fabricante, o de otro modo, no constituye necesariamente ni implica un endoso o recomendación
por parte de ${termsOfUse.siteHost}. Los puntos de vista y opiniones de los autores expresadas en este documento
no representan ni reflejan necesariamente las de Cornell y no podrá ser utilizado para fines publicitarios o
endoso de productos.</p>
</section>
comercial, marca, fabricante, o de otro modo, no constituye necesariamente ni implica un endoso o recomendación
por parte de ${termsOfUse.siteHost}. Los puntos de vista y opiniones de los autores expresadas en este documento
no representan ni reflejan necesariamente las de Cornell y no podrá ser utilizado para fines publicitarios o
endoso de productos.</p>
</section>

View file

@ -3,7 +3,7 @@
<#-- Confirmation that an account has been created. -->
<#assign subject = "Su cuenta ${siteName} ha sido creado." />
<#assign html>
<html>
<head>
@ -51,13 +51,13 @@ ${userAccount.firstName} ${userAccount.lastName}
Enhorabuena!
Hemos creado la nueva cuenta en ${siteName},
Hemos creado la nueva cuenta en ${siteName},
asociada con ${userAccount.emailAddress}.
Si no has solicitado esta nueva cuenta puede ignorar este mensaje.
Esta solicitud caducará si no se hubiere pronunciado sobre durante 30 días.
Pega el siguiente enlace en la barra de direcciones de su navegador para
Pega el siguiente enlace en la barra de direcciones de su navegador para
crear su contraseña para su nueva cuenta usando nuestro servidor seguro.
${passwordLink}

View file

@ -34,7 +34,7 @@ ${userAccount.firstName} ${userAccount.lastName}
Contraseña creado con éxito.
Su nueva contraseña asociada con ${userAccount.emailAddress}
Su nueva contraseña asociada con ${userAccount.emailAddress}
se ha creado.
Gracias.

View file

@ -35,7 +35,7 @@ ${userAccount.firstName} ${userAccount.lastName}
Contraseña cambiada con éxito.
Su nueva contraseña asociada con ${userAccount.emailAddress}
Su nueva contraseña asociada con ${userAccount.emailAddress}
ha sido cambiado.
Gracias.

View file

@ -13,28 +13,28 @@
<p>
Estimado ${userAccount.firstName} ${userAccount.lastName}:
</p>
<p>
Hemos recibido una solicitud para restablecer la contraseña de su cuenta ${siteName}
Hemos recibido una solicitud para restablecer la contraseña de su cuenta ${siteName}
(${userAccount.emailAddress}).
</p>
<p>
Por favor, siga las siguientes instrucciones para proceder con su restablecimiento de contraseña.
</p>
<p>
Si no has solicitado esta nueva cuenta puede ignorar este mensaje.
Esta solicitud caducará si no se hubiere pronunciado en un plazo de 30 días.
</p>
<p>
Haga clic en el enlace de abajo o pegarlo en la barra de direcciones de su navegador para
Haga clic en el enlace de abajo o pegarlo en la barra de direcciones de su navegador para
restablecer su contraseña usando nuestro servidor seguro.
</p>
<p>${passwordLink}</p>
<p>¡Gracias!</p>
</body>
</html>
@ -42,7 +42,7 @@
<#assign text>
Estimado ${userAccount.firstName} ${userAccount.lastName}:
Hemos recibido una solicitud para restablecer la contraseña de su cuenta ${siteName}
(${userAccount.emailAddress}).
@ -51,11 +51,11 @@ Por favor, siga las siguientes instrucciones para proceder con su restablecimien
Si no has solicitado esta nueva cuenta puede ignorar este mensaje.
Esta solicitud caducará si no se hubiere pronunciado en un plazo de 30 días.
Pega el siguiente enlace en la barra de direcciones de su navegador para
Pega el siguiente enlace en la barra de direcciones de su navegador para
restablecer su contraseña usando nuestro servidor seguro.
${passwordLink}
¡Gracias!
</#assign>