/lenasys/0.1

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/0.1

« back to all changes in this revision

Viewing changes to trunk/CodeViewer/Codeviewer/showcode copy.js

  • Committer: c11emian
  • Date: 2013-04-03 12:27:12 UTC
  • mfrom: (9 lenasys)
  • mto: (9.2.2 lenasys)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: c11emian@student.his.se-20130403122712-ha93wrxm4isfv16h
Adjusted the file showcode.php so that it conforms to our code standard.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
                       var mb=0;
2
 
                        var panelwidth=450;
3
 
                        var mx,my;
4
 
 
5
 
                        function resize() {
6
 
                document.getElementById("bottom").style.height = (document.body.clientHeight - 44) + "px";
7
 
                document.getElementById("panel").style.height = (document.body.clientHeight - 44) + "px";
8
 
                        }                       
9
 
                        
10
 
                        function resizepanel(ev)
11
 
                        {
12
 
 
13
 
                                        var panel=document.getElementById('panel');
14
 
 
15
 
                                  if (ev.layerX||ev.layerX==0) { // Firefox
16
 
                                            mx=ev.layerX-panel.offsetLeft;
17
 
                                            my=ev.layerY-panel.offsetTop;
18
 
                                  } else if (ev.offsetX || ev.offsetX == 0) { // Opera
19
 
                                            mx=ev.offsetX-panel.offsetLeft;
20
 
                                            my=ev.offsetY-panel.offsetTop;
21
 
                                  }                     
22
 
 
23
 
                                        if((mx>(panelwidth-4))&&(mx<(panelwidth+4))){
24
 
                                                        panel.style.cursor="col-resize";                                        
25
 
                                        }else{
26
 
                                                        panel.style.cursor="default";
27
 
                                        }
28
 
                                  
29
 
                                  if(mb){
30
 
                                                panel.style.width=mx+4;
31
 
                                                panelwidth=mx+4;
32
 
                                                        panel.style.cursor="col-resize";
33
 
                                                return false;
34
 
                                  }else{
35
 
                                                return true;
36
 
                                  }
37
 
                                  
38
 
                        }
39
 
                        
40
 
                        function mdpanel(ev)
41
 
                        {
42
 
                                        if((mx>(panelwidth-4))&&(mx<(panelwidth+4))) mb=1;                      
43
 
                        }
44
 
                        
45
 
                        function mupanel(ev)
46
 
                        {
47
 
                                        mb=0;
48
 
                        }