Merge lp:~adamringhede/lenasys/branch into lp:~lenasysimpl1/lenasys/GammaBear

Proposed by Adam Ringhede
Status: Merged
Merged at revision: 22
Proposed branch: lp:~adamringhede/lenasys/branch
Merge into: lp:~lenasysimpl1/lenasys/GammaBear
Diff against target: 373 lines (+138/-36)
5 files modified
Code Viewer Alt/index.js (+5/-3)
Code Viewer Alt/style.css (+16/-9)
CodeViewer/Lindex.css (+56/-21)
CodeViewer/Lindex.html (+6/-3)
CodeViewer/Lindex.js (+55/-0)
To merge this branch: bzr merge lp:~adamringhede/lenasys/branch
Reviewer Review Type Date Requested Status
GammaBjörn Pending
Review via email: mp+157338@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Code Viewer Alt/index.js'
2--- Code Viewer Alt/index.js 2013-04-04 16:28:40 +0000
3+++ Code Viewer Alt/index.js 2013-04-05 12:03:30 +0000
4@@ -15,11 +15,13 @@
5 scrollTo(destination);
6 });
7 var sidebar = $('#sidebar');
8- $(document).bind('scroll', function() {
9+ $(window).bind('scroll', function() {
10 sidebar.css("top", $(window).scrollTop());
11 });
12- $('.ieCSS3Fix, .menuLink').each(function() {
13- PIE.attach(this);
14+ $('.ieCSS3Fix, .group h2').each(function() {
15+ if(PIE.attach) {
16+ PIE.attach(this);
17+ }
18 });
19 });
20
21
22=== modified file 'Code Viewer Alt/style.css'
23--- Code Viewer Alt/style.css 2013-04-04 16:28:40 +0000
24+++ Code Viewer Alt/style.css 2013-04-05 12:03:30 +0000
25@@ -35,11 +35,13 @@
26 background: linear-gradient(to top, #abc 10%, #89a 90%, #678 99% );
27 background: -webkit-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
28 background: -moz-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
29+ -pie-background: linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
30 font-size: 1.4em;
31 margin-top: 1em;
32 margin-bottom: 0;
33 padding:3px;
34 padding-left:20px;
35+ min-width:100%;
36 }
37
38 a {
39@@ -75,13 +77,10 @@
40 position:absolute;
41 top:40px;
42 left:0px;
43- width:10.5%;
44- width:96%;
45- padding: 10px 0 1% 0.3%;
46+ width:90%;
47+ padding: 10px 0 8% 8%;
48 background: #c0d0e0;
49 background-color: #c0d0e0;
50- _border-bottom-right-radius: 1.3em;
51- _border-top-right-radius: 1.3em;
52 border-radius: 0 1.3em 1.3em 0;
53 border-bottom: 2px solid #000;
54 border-right: 1px solid #000;
55@@ -93,15 +92,17 @@
56 background: linear-gradient(to top, #abc 10%, #89a 90%, #678 99% );
57 background: -webkit-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
58 background: -moz-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
59+ -pie-background: linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
60 }
61
62 #menu #menuHeader{
63 margin:0 0 1.5% 0;
64+ position:relative;
65 background:#333333;
66 width:97%;
67 height:31px;
68- padding-left:10px;
69- margin-left:-10px;
70+ padding-left:14px;
71+ margin-left:-15px;
72 border-radius: 0 10px 10px 0;
73 cursor:pointer;
74 }
75@@ -130,6 +131,12 @@
76 text-decoration: none;
77 margin-left:1%;
78 font-size:100%
79+
80+ /* For IE 8 */
81+ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-90, Color='#444444')";
82+ /* For IE 5.5 - 7 */
83+ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-90, Color='#444444');
84+ filter:DropShadow(Color=#444444, OffX=1, OffY=2);
85 }
86
87 #menu a:hover {
88@@ -147,7 +154,7 @@
89 left:0px;
90 top:0px;
91 float:left;
92- min-width:8em;
93+ min-width:9.4em;
94 width:auto;
95 height:100%;
96 overflow:auto;
97@@ -155,7 +162,7 @@
98
99 #content {
100 position:absolute;
101- left:8em;
102+ left:9.5em;
103 max-width:75%;
104 min-width:20em;
105 }
106
107=== modified file 'CodeViewer/Lindex.css'
108--- CodeViewer/Lindex.css 2013-04-05 08:14:27 +0000
109+++ CodeViewer/Lindex.css 2013-04-05 12:03:30 +0000
110@@ -1,4 +1,4 @@
111-.group {
112+.group {
113 display: block;
114 padding: 1em;
115 width: 100%;
116@@ -10,18 +10,17 @@
117 font-weight: normal;
118 font-size: 1.8em;
119 margin-bottom: 1em;
120-
121 font-family: Cambria, Georgia, serif;
122 }
123
124-.group .info {
125+.group.info {
126 padding: 0.4em;
127 margin: 0.5em;
128 font-size: 1em;
129 color: #000;
130 }
131
132-.group .info:first-letter {
133+.group .info:first-letter {
134 font-size:1.3em;
135 }
136
137@@ -36,11 +35,13 @@
138 background: linear-gradient(to top, #abc 10%, #89a 90%, #678 99% );
139 background: -webkit-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
140 background: -moz-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
141+ -pie-background: linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
142 font-size: 1.4em;
143 margin-top: 1em;
144 margin-bottom: 0;
145 padding:3px;
146 padding-left:20px;
147+ min-width:100%;
148 }
149
150 a {
151@@ -64,23 +65,24 @@
152 margin-left: 8px;
153 }
154
155-.container .demo {
156+.container.demo {
157 float:right;
158 }
159
160-body {
161+body{
162 margin:0;
163 }
164
165 #menu {
166- position:fixed;
167+ position:absolute;
168 top:40px;
169+ left:0px;
170 width:10.5%;
171+ width:96%;
172 padding: 10px 0 1% 0.3%;
173 background: #c0d0e0;
174 background-color: #c0d0e0;
175- border-bottom-right-radius: 1.3em;
176- border-top-right-radius: 1.3em;
177+ border-radius: 0 1.3em 1.3em 0;
178 border-bottom: 2px solid #000;
179 border-right: 1px solid #000;
180 color: #fff;
181@@ -91,17 +93,19 @@
182 background: linear-gradient(to top, #abc 10%, #89a 90%, #678 99% );
183 background: -webkit-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
184 background: -moz-linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
185-
186+ -pie-background: linear-gradient(bottom, #abc 10%, #89a 90%, #678 99%);
187 }
188
189-#menu #menuHeader {
190+#menu #menuHeader{
191 margin:0 0 1.5% 0;
192+ position:relative;
193 background:#333333;
194 width:97%;
195 height:31px;
196 padding-left:10px;
197 margin-left:-10px;
198- border-radius: 0 10px 10px 0
199+ border-radius: 0 10px 10px 0;
200+ cursor:pointer;
201 }
202
203 #menuHeader h3{
204@@ -115,39 +119,70 @@
205 padding:0;
206 }
207
208-#menuArrow{
209+#menuArrow {
210 float:left;
211 padding:0;
212 margin-top:8px;
213 width:15%;
214 }
215
216-#menu a{
217+#menu a {
218 display:block;color:#fff;
219 font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
220 text-decoration: none;
221 margin-left:1%;
222 font-size:100%
223+
224+ /* For IE 8 */
225+ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-90, Color='#444444')";
226+ /* For IE 5.5 - 7 */
227+ filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-90, Color='#444444');
228+ filter:DropShadow(Color=#444444, OffX=1, OffY=2);
229 }
230
231-#menu a:hover{
232+#menu a:hover {
233 font-weight:bolder;
234 text-decoration:underline;
235 }
236
237-#menuItems{
238+#menuItems {
239 float:left;
240 width:80%;
241 }
242
243-#sidebar{
244+#sidebar {
245+ position:absolute;
246+ left:0px;
247+ top:0px;
248 float:left;
249- min-width:11%;
250- min-height:100px;
251+ min-width:8em;
252+ width:auto;
253+ height:100%;
254 overflow:auto;
255 }
256
257-#content{
258- float:left;
259+#content {
260+ position:absolute;
261+ left:8em;
262 width:75%;
263+ max-width:75%;
264+ min-width:20em;
265+}
266+
267+.arrow{
268+ -webkit-transition-duration: 0.9s;
269+ -moz-transition-duration: 0.9s;
270+ -o-transition-duration: 0.9s;
271+ transition-duration: 0.9s;
272+ -webkit-transition-property: -webkit-transform;
273+ -moz-transition-property: -moz-transform;
274+ -o-transition-property: -o-transform;
275+ transition-property: transform;
276+ overflow:auto;
277+}
278+
279+.rotateArrowCW {
280+ -webkit-transform:rotate(180deg);
281+ -moz-transform:rotate(180deg);
282+ -o-transform:rotate(180deg);
283 }
284\ No newline at end of file
285
286=== modified file 'CodeViewer/Lindex.html'
287--- CodeViewer/Lindex.html 2013-04-05 08:33:04 +0000
288+++ CodeViewer/Lindex.html 2013-04-05 12:03:30 +0000
289@@ -3,17 +3,20 @@
290 <head>
291 <title>Webbprogrammering DA330G</title>
292 <link rel="stylesheet" href="Lindex.css" type="text/css" media="screen" />
293+ <script type="text/javascript" src="../js/jquery.js"></script>
294+ <script type="text/javascript" src="../etc/PIE/PIE.js"></script>
295+ <script type="text/javascript" src="Lindex.js"></script>
296 </head>
297 <body>
298 <div id="sidebar">
299- <div id="menu">
300- <div id="menuHeader">
301+ <div id="menu" class="ieCSS3Fix">
302+ <div id="menuHeader" class="ieCSS3Fix">
303 <h3>Quick links</h3>
304+ <img id="menuArrow" class="arrow" src="../media/codeviewer/CodeViewerLeftbutton.png" alt="arrow" />
305 </div>
306 <div id="menuItems">
307 <a href="#LectureSlides" class="menuLink">Lectures</a>
308 <a href="#Assignments" class="menuLink">Assignments</a>
309- <br>
310 <a href="#PHPIntro" class="menuLink">PHP Intro</a>
311 <a href="#SAXExamples" class="menuLink">SAX</a>
312 <a href="#DOMExamples" class="menuLink">DOM</a>
313
314=== added file 'CodeViewer/Lindex.js'
315--- CodeViewer/Lindex.js 1970-01-01 00:00:00 +0000
316+++ CodeViewer/Lindex.js 2013-04-05 12:03:30 +0000
317@@ -0,0 +1,55 @@
318+var menuTopOffset = 40;
319+var menuLeftOffset = 25;
320+
321+$(document).ready(function() {
322+// window.onresize = fixMenuLeft;
323+ //$('#menu').offset({ top: menuTopOffset, left: $('#menu').offset().left });
324+ //window.onscroll = moveMenu;
325+ $('#menuHeader').click(toggleMenu);/*
326+
327+ */
328+ $("a.menuLink").click(function(event) {
329+ event.preventDefault();
330+ event.stopPropagation();
331+ var destination = event.target.href.substring(event.target.href.lastIndexOf('#') + 1);
332+ scrollTo(destination);
333+ });
334+ var sidebar = $('#sidebar');
335+ $(window).bind('scroll', function() {
336+ sidebar.css("top", $(window).scrollTop());
337+ });
338+ $('.ieCSS3Fix, .group h2').each(function() {
339+ PIE.attach(this);
340+ });
341+});
342+
343+function fixMenuLeft(ev) {
344+ //$('#menu').offset({ top: bodyelem.scrollTop()+menuTopOffset, left: -($('#menu').width()-30) });
345+ if($('#menu').offset().left != 0) {
346+ $('#menu').offset({ top: $('#menu').offset().top, left: -($('#menu').width()-menuLeftOffset) });
347+ }
348+}
349+
350+function toggleMenu(ev) {
351+ if($('#menu').offset().left == 0) {
352+ $('#menu').stop().animate({ left: -($('#menu').width()-menuLeftOffset) },{duration:900});
353+ $("#menuArrow").addClass("rotateArrowCW");
354+ } else {
355+ $('#menu').stop().animate({ left: 0 },{duration:900});
356+ $("#menuArrow").removeClass("rotateArrowCW");
357+ }
358+}
359+
360+function moveMenu(ev){
361+ if($.browser.webkit) {
362+ bodyelem = $("body");
363+ } else {
364+ bodyelem = $("html,body");
365+ }
366+ $('#menu').offset({ top: bodyelem.scrollTop()+menuTopOffset, left: $('#menu').offset().left });
367+}
368+
369+function scrollTo(id){
370+ $('html,body').animate({scrollTop: $("#"+id).offset().top},{duration:900});
371+ return false;
372+}
373\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: