/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: b11johgu
  • Date: 2013-05-14 12:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: b11johgu@student.his.se-20130514123038-rthxj3f34o32gpxy
ExamplesController:
- Added expand/collapse arrows for categories/subcategories.
- Added category positioning (incomplete).

more general changes made.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
                // The name of the $_FILES entry:
8
8
                paramname:'files',
9
9
                
10
 
                url: $('input[name="baseurl"]').val()+'admin/uploadfile/'+$('input[name="cid"]').val()+'/'+$('input[name="category"]').val()+'/'+$('input[name="subcategory"]').val()+'/'+$('input[name="example"]').val(),
 
10
                url: '../../../uploadfile/'+$('input[name="cid"]').val()+'/'+$('input[name="example"]').val()+'/'+$('input[name="page"]').val(),
11
11
                
12
12
                uploadFinished:function(i,file,response){
13
13
                        $('.progress').addClass('done');
17
17
                        html += '<input type="hidden" value="'+file.name+'">';
18
18
                        html += '<label>Language</label><input type="text" name="'+file.name.replace(/\s/g,"")+'_lang" onChange="fileupdated()">';
19
19
                        html += '<label>Type</label><input type="text"  name="'+file.name.replace(/\s/g,"")+'_type" onChange="fileupdated()">';
20
 
                        html += '<label>Column</label><select name="'+file.name.replace(/\s/g,"")+'_type" onChange="fileupdated()"><option>1</option><option selected>2</option></select>';
21
20
                        html += "</div>";
22
21
                        $('#filelist').append(html);
23
22
 
53
52
                message.html(msg);
54
53
        }
55
54
 
56
 
        
57
 
 
58
55
});
59
56
 
60
57
function fileupdated(){
61
58
        var fileinfo = [];
62
59
        $('.file').each(function() {
63
60
                inputs = $(this).find("input");
64
 
                selects = $(this).find("select");
65
 
                fileinfo.push({"filename":inputs.get(0).value, "lang": inputs.get(1).value, "type": inputs.get(2).value, "columnNr": selects.get(0).value});
 
61
                fileinfo.push({"filename":inputs.get(0).value, "lang": inputs.get(1).value, "type": inputs.get(2).value});
66
62
        });
67
63
        $("input[name='files']").val(JSON.stringify(fileinfo));
68
 
}
 
64
}
 
 
b'\\ No newline at end of file'