/lenasys/trunk

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

« back to all changes in this revision

Viewing changes to codeigniter/js/script.js

  • Committer: galaxyAbstractor
  • Date: 2013-04-10 15:49:32 UTC
  • mto: (19.1.5 lenasys)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: galaxyabstractor@gmail.com-20130410154932-4vizlzk0ar5gykvi
* Added an simple admin panel to the codeviewer-cmssy stuff
* Redesigned a bit like the mockups - still stuff to come
* Implemented the codeviewer + admin panel again using the Framework CodeIgniter instead 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$(function(){
 
2
        var $_GET = {};
 
3
 
 
4
        document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () {
 
5
            function decode(s) {
 
6
                return decodeURIComponent(s.split("+").join(" "));
 
7
            }
 
8
 
 
9
            $_GET[decode(arguments[1])] = decode(arguments[2]);
 
10
        });
 
11
 
 
12
        var dropbox = $('#dropbox'),
 
13
                message = $('.message', dropbox);
 
14
        
 
15
        dropbox.filedrop({
 
16
                // The name of the $_FILES entry:
 
17
                paramname:'files',
 
18
                
 
19
                url: '../../../uploadfile/'+$('input[name="cid"]').val()+'/'+$('input[name="example"]').val()+'/'+$('input[name="page"]').val(),
 
20
                
 
21
                uploadFinished:function(i,file,response){
 
22
                        $('.progress').addClass('done');
 
23
                        $('#flist').append("<li>"+file.name+"</li>")
 
24
 
 
25
                },
 
26
                
 
27
        error: function(err, file) {
 
28
                        switch(err) {
 
29
                                case 'BrowserNotSupported':
 
30
                                        showMessage('Your browser does not support HTML5 file uploads!');
 
31
                                        break;
 
32
                                default:
 
33
                                        break;
 
34
                        }
 
35
                },
 
36
                
 
37
                // Called before each upload is started
 
38
                beforeEach: function(file){
 
39
                        
 
40
                },
 
41
                
 
42
                uploadStarted:function(i, file, len){
 
43
                        
 
44
                },
 
45
                
 
46
                progressUpdated: function(i, file, progress) {
 
47
                        $('.progress').width(progress);
 
48
                }
 
49
         
 
50
        });
 
51
        
 
52
 
 
53
        function showMessage(msg){
 
54
                message.html(msg);
 
55
        }
 
56
 
 
57
});
 
 
b'\\ No newline at end of file'