Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL_Top_Level
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Digital Experience Group
UNL_Top_Level
Commits
526016b8
Commit
526016b8
authored
11 years ago
by
Michael Fairchild
Browse files
Options
Downloads
Patches
Plain Diff
Load the facstaff news feed form news.unl.edu
parent
c1c2c5fb
No related branches found
No related tags found
1 merge request
!12
Fix Facstaff News Feed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
facstaff/index.shtml
+26
-45
26 additions, 45 deletions
facstaff/index.shtml
with
26 additions
and
45 deletions
facstaff/index.shtml
+
26
−
45
View file @
526016b8
...
@@ -33,52 +33,33 @@
...
@@ -33,52 +33,33 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
WDN
.
jQuery
(
'
document
'
).
ready
(
function
()
{
WDN
.
jQuery
(
'
document
'
).
ready
(
function
()
{
var
title
,
list_item
,
uri
,
value
,
file_uri
,
file_value
;
var
title
,
list_item
,
uri
,
img_uri
;
var
display_amount
=
5
;
var
display_amount
=
5
;
var
i
=
0
;
var
i
=
0
;
function
objectSize
(
obj
)
{
WDN
.
jQuery
.
get
(
'
http://news.unl.edu/free-tags/facultystaff/?format=partial
'
,
function
(
data
)
{
var
size
=
0
,
key
;
for
(
key
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
key
))
size
++
;
}
return
size
;
};
// For the student news stories from today@unl
WDN
.
jQuery
.
getJSON
(
'
http://newsroom.unl.edu/announce/todayatunl/latest?format=json
'
,
function
(
data
)
{
var
size
=
0
,
key
;
for
(
key
in
data
.
stories
)
{
if
(
data
.
stories
.
hasOwnProperty
(
key
))
size
++
;
}
if
(
objectSize
(
data
.
stories
)
>
0
)
{
WDN
.
jQuery
(
"
#newsAndEvents a
"
).
remove
();
WDN
.
jQuery
(
"
#newsAndEvents
"
).
append
(
'
<ul id="newsList" />
'
);
WDN
.
jQuery
(
"
#newsAndEvents
"
).
append
(
'
<ul id="newsList" />
'
);
WDN
.
jQuery
.
each
(
var
articles
=
WDN
.
jQuery
(
WDN
.
jQuery
.
parseHTML
(
data
)).
find
(
'
article
'
).
each
(
function
()
{
data
.
stories
,
//Only pull in the display amount
function
(
uri
,
value
)
{
if
(
i
>=
display_amount
)
{
if
(
i
<
display_amount
&&
value
[
'
id
'
]
!=
'
1604
'
)
{
//1604 is an ad (http://newsroom.unl.edu/announce/stories/1604)
return
;
title
=
value
[
'
title
'
];
WDN
.
log
(
value
[
'
files
'
]);
if
(
objectSize
(
value
[
'
files
'
])
>
0
){
WDN
.
jQuery
.
each
(
value
[
'
files
'
],
function
(
file_uri
,
file_value
)
{
if
(
file_value
[
'
use_for
'
]
==
"
thumbnail
"
)
{
list_item
=
'
<li><a href="
'
+
uri
+
'
"><img src="
'
+
file_uri
+
'
" alt="" /><span class="newsTitle">
'
+
title
+
'
</span></a></li>
'
;
}
}
}
);
var
$article
=
WDN
.
jQuery
(
this
);
title
=
$article
.
find
(
'
.field-name-title
'
).
text
().
trim
();
uri
=
'
http://news.unl.edu
'
+
$article
.
find
(
'
.field-name-title a
'
).
attr
(
'
href
'
);
img_uri
=
$article
.
find
(
'
.content img
'
).
attr
(
'
src
'
);
if
(
img_uri
)
{
list_item
=
'
<li><a href="
'
+
uri
+
'
"><img src="
'
+
img_uri
+
'
" alt="" /><span class="newsTitle">
'
+
title
+
'
</span></a></li>
'
;
}
else
{
}
else
{
list_item
=
'
<li><a href="
'
+
uri
+
'
"><span class="newsTitle">
'
+
title
+
'
</span></a></li>
'
;
list_item
=
'
<li><a href="
'
+
uri
+
'
"><span class="newsTitle">
'
+
title
+
'
</span></a></li>
'
;
}
}
WDN
.
jQuery
(
'
#newsList
'
).
append
(
list_item
);
WDN
.
jQuery
(
'
#newsList
'
).
append
(
list_item
);
i
++
;
i
++
;
};
});
}
});
);
};
}
);
});
});
</script>
</script>
<link
rel=
"stylesheet"
href=
"/ucomm/sharedcode/css/3.1.css"
/>
<link
rel=
"stylesheet"
href=
"/ucomm/sharedcode/css/3.1.css"
/>
...
@@ -234,7 +215,7 @@
...
@@ -234,7 +215,7 @@
</section>
</section>
<div
id=
"newsAndEvents"
class=
"grid2"
>
<div
id=
"newsAndEvents"
class=
"grid2"
>
<span
class=
"subTitle"
style=
"padding:4px;"
>
Latest Faculty / Staff News
</span>
<span
class=
"subTitle"
style=
"padding:4px;"
>
Latest Faculty / Staff News
</span>
<a
href=
"http://news
room
.unl.edu/
announce/todayatunl/"
>
Today
@UNL
is your source for the latest faculty/staff news.
</a>
<a
href=
"http://news.unl.edu/
newsrooms/unltoday/"
>
UNL
Today is your source for the latest faculty/staff news.
</a>
</div>
</div>
<section
id=
"university-structure"
class=
"grid10 first"
>
<section
id=
"university-structure"
class=
"grid10 first"
>
<div
class=
"grid5 first"
>
<div
class=
"grid5 first"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment