/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: Gustav Hartvigsson
  • Date: 2013-04-12 17:00:09 UTC
  • mfrom: (23.1.4 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130412170009-gla04s3anpjep68p
Merging implementation group one's team bnanch in to trunk.
This is also end of this cycle.

Good work guys.

20130412.

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
 
        });
11
2
 
12
3
        var dropbox = $('#dropbox'),
13
4
                message = $('.message', dropbox);
20
11
                
21
12
                uploadFinished:function(i,file,response){
22
13
                        $('.progress').addClass('done');
23
 
                        $('#flist').append("<li>"+file.name+"</li>")
 
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);
24
22
 
25
23
                },
26
24
                
54
52
                message.html(msg);
55
53
        }
56
54
 
57
 
});
 
 
b'\\ No newline at end of file'
 
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'