-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid.html
177 lines (170 loc) · 7.58 KB
/
grid.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=“X-UA-Compatible” content=“IE=8” />
<title>Welcome to GRID</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="css/grid.css" type="text/css" media="screen, projection" />
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type='text/javascript' src='https://grid.nike.com/assets/jwplayer/jwplayer.js'></script>
<script type="text/javascript">
function removeLeadSlash(url) {
var newString = url.replace(/\%2F/gi,'/');
var newString = newString.replace(/\%3F/gi,'?');
var newString = newString.replace(/\%3D/gi,'=');
// alert(newString);
return newString;
}
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
value = removeLeadSlash(value);
vars[key] = value;
});
return vars;
}
function writeRedirectDest(dest){
document.write('<input name="redirect" type="hidden" value="' + dest + '"/>');
// alert('<input name="redirect" type="hidden" value="' +dest+'"/>');
}
var dest = getUrlVars()["redirect"];
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() == '' || input.val() == input.attr('placeholder')) {
input.addClass('placeholder');
input.val(input.attr('placeholder'));
}
}).blur().parents('form').submit(function() {
$(this).find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
})
});
</script>
<script>
$(document).ready(function(){
$.ajax({
type: "GET",
// url: "http://localhost/grid.xml",
url: "https://grid.nike.com/assets/gridrss/index.xml",
dataType: "xml",
success: function(xml) {
var id=0;
$(xml).find('item').each(function(){
var title = $(this).find('title').text();
var link = $(this).find('link').text(); //link is actually to the story on teh story.html page
var guid = $(this).find('guid').text();
var badimage = $(this).find('image').text();
var image = badimage.replace(/http:\/\/nikeblogs\.nike\.com/gi,"https://grid.nike.com/assets/zeroimage");
var video = $(this).find('video').text();
var body = $(this).find('body').text();
var description = $(this).find('description').text();
var pubDate = $(this).find('pubDate').text();
$('<div class="span3" id="story'+id+'"></div>').html('<a href="https://grid.nike.com/assets/splash/story.html?story='+id+'"><img src="'+image+'"></a>').appendTo('#stories');
$('<div class="spacer10">').html('').appendTo('#story'+id);
$('<div class="title">').html('<b>'+title.toUpperCase()+'</b>').appendTo('#story'+id);
$('<div class="description">').html(description).appendTo('#story'+id);
// $('<div class="body">').html(body).appendTo('#story'+id);
// alert('title: '+title);
id++;
//only show 4 stories...
if (id > 3){return (false);}
});
}
});
});
</script>
</head>
<body>
<div class="block" style="height: 100px;">
<div class="centered">
<div class="container">
<div class="row-fluid">
<div class="span12" id="main" bgcolor="#ffffff">
<div class ="row-fluid" id="spacer">
<div class="spacer30">
</div>
</div>
<div class="row-fluid" id="row1">
<div class="span3">
<div id="grid_logo">
<img src="img/grid_logo.png">
</div>
<div class="spacer20">
</div>
<div>
<form name="loginForm" method="post" id="loginForm" action="https://gridqa.nike.com/login">
<script type="text/javascript">
writeRedirectDest(dest)</script>
<input name="fromLogin" type="hidden" value="true" />
<input id="username_" class="input-medium" name="login" type="text" placeholder="Nike Network Username">
<input id="password_" type="password" class="input-medium" name="password" placeholder="Nike Network Password">
<button class="btn btn-warning" type="submit">LOG IN</button>
</form>
</div>
<div id="grid_blurb">
Grid is a collaboration platform that amplifies connections to accelerate business performance, inspire ideas, and ignite innovation<BR />
GRID is available to anyone who can log in to the NIKE, Inc. network, including employees, and ETWs of Nike and its Affiliates.
</div>
</div>
<div class="span9">
<div id='mediaplayer'></div>
<script type="text/javascript">
jwplayer('mediaplayer').setup({
'flashplayer': 'https://grid.nike.com/assets/jwplayer/player.swf',
'id': 'playerID',
'image': 'https://grid.nike.com/assets/splash/img/lebron_james.jpg',
'width': '530',
'height': '360',
'file': 'https://grid.nike.com/assets/videos/GRIDfinalLR.mp4',
'bufferlength': '1',
'autostart': 'false'
});
</script>
</div>
</div>
<div class="spacer25">
</div>
<div class="row-fluid" id="stories">
</div>
<div class="spacer25">
</div>
<div class="hrule">
<image src="img/1px_dots.png" />
</div>
<div class="spacer20">
</div>
<div id="affiliates">
<img src="img/connect_collaborate_innovate.png" alt="Connect. Collaborate. Innovate"><img src="img/affiliate_logos.png" alt="Affiliate Logos" align="right">
</div>
<div class ="row-fluid">
<div class="spacer20">
</div>
</div>
<div class="hrule">
<image src="img/1px_dots.png" />
</div>
<div class="spacer20">
</div>
<div id="footer">
<A HREF="https://grid.nike.com/etiquette">GRID Etiquette</A> | <A HREF="https://grid.nike.com/TandC">Terms & Conditions</A> | <A HREF="https://grid.nike.com/Contact">Contact Us</A> | <EM>© 2009-2013 Cisco Systems. All rights reserved. WebEx Social Version 3.1.0 10000 107</EM>
</div>
<div class="spacer30">
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>