/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
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
        });
2
11
 
3
12
        var dropbox = $('#dropbox'),
4
13
                message = $('.message', dropbox);
11
20
                
12
21
                uploadFinished:function(i,file,response){
13
22
                        $('.progress').addClass('done');
14
 
                        html = "";
15
 
                        html += '<div class="file">';
16
 
                        html += "<strong>"+file.name+"</strong>";
17
 
                        html += '<input type="hidden" value="'+file.name+'">';
18
 
                        html += '<label>Language</label><input type="text" name="'+file.name.replace(/\s/g,"")+'_lang" onChange="fileupdated()">';
19
 
                        html += '<label>Type</label><input type="text"  name="'+file.name.replace(/\s/g,"")+'_type" onChange="fileupdated()">';
20
 
                        html += "</div>";
21
 
                        $('#filelist').append(html);
 
23
                        $('#flist').append("<li>"+file.name+"</li>")
22
24
 
23
25
                },
24
26
                
52
54
                message.html(msg);
53
55
        }
54
56
 
55
 
});
56
 
 
57
 
function fileupdated(){
58
 
        var fileinfo = [];
59
 
        $('.file').each(function() {
60
 
                inputs = $(this).find("input");
61
 
                fileinfo.push({"filename":inputs.get(0).value, "lang": inputs.get(1).value, "type": inputs.get(2).value});
62
 
        });
63
 
        $("input[name='files']").val(JSON.stringify(fileinfo));
64
 
}
 
 
b'\\ No newline at end of file'
 
57
});
 
 
b'\\ No newline at end of file'