aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/upload_js.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /views/default/js/upload_js.php
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/js/upload_js.php')
-rw-r--r--views/default/js/upload_js.php112
1 files changed, 56 insertions, 56 deletions
diff --git a/views/default/js/upload_js.php b/views/default/js/upload_js.php
index ab8c0dc20..cdd011729 100644
--- a/views/default/js/upload_js.php
+++ b/views/default/js/upload_js.php
@@ -1,57 +1,57 @@
-<script>
-/*
-Part of multi file uploader
-*/
-
-var number_of_files = 1;
-
-// wait for the DOM to be loaded
-$(document).ready(function() {
- // bind 'file_form' and provide a simple callback function
- $('#file_form').submit(function() {
- $('#form_container').hide();
- $('#form_message').html('<div class="contentWrapper"><?php echo $vars['submit_message']; ?></div>');
- $('#form_message').show();
- $(this).ajaxSubmit(function(response_message) {
- $('#form_message').html('<div class="contentWrapper">'+response_message+'</div>');
- });
-
- return false;
- });
-});
-
-function file_generate_bit(bit_label,prefix,classname,field_type,field_size) {
- bit = document.createElement('p');
- label = document.createElement('label');
- textnode = document.createTextNode(bit_label);
- label.appendChild(textnode);
- el = document.createElement('br');
- label.appendChild(el);
- el = document.createElement('input');
- el.type = field_type;
- el.className = classname;
- if (field_size > 0) {
- el.size = field_size;
- }
- el.name = prefix+number_of_files;
- el.value = "";
- label.appendChild(el);
- bit.appendChild(label);
-
- return bit;
-}
-
-function file_addtoform() {
- var o,el;
- o = document.getElementById('option_container');
- title_label = "<?php echo elgg_echo("title"); ?>";
- bit = file_generate_bit(title_label,'title_','input-text','text',0);
- o.appendChild(bit);
- file_label = "<?php echo elgg_echo("file:file"); ?>";
- bit = file_generate_bit(file_label,'upload_','input-file','file',30);
- o.appendChild(bit);
-
- number_of_files++;
- document.file_form.number_of_files.value = number_of_files;
-}
+<script>
+/*
+Part of multi file uploader
+*/
+
+var number_of_files = 1;
+
+// wait for the DOM to be loaded
+$(document).ready(function() {
+ // bind 'file_form' and provide a simple callback function
+ $('#file_form').submit(function() {
+ $('#form_container').hide();
+ $('#form_message').html('<div class="contentWrapper"><?php echo $vars['submit_message']; ?></div>');
+ $('#form_message').show();
+ $(this).ajaxSubmit(function(response_message) {
+ $('#form_message').html('<div class="contentWrapper">'+response_message+'</div>');
+ });
+
+ return false;
+ });
+});
+
+function file_generate_bit(bit_label,prefix,classname,field_type,field_size) {
+ bit = document.createElement('p');
+ label = document.createElement('label');
+ textnode = document.createTextNode(bit_label);
+ label.appendChild(textnode);
+ el = document.createElement('br');
+ label.appendChild(el);
+ el = document.createElement('input');
+ el.type = field_type;
+ el.className = classname;
+ if (field_size > 0) {
+ el.size = field_size;
+ }
+ el.name = prefix+number_of_files;
+ el.value = "";
+ label.appendChild(el);
+ bit.appendChild(label);
+
+ return bit;
+}
+
+function file_addtoform() {
+ var o,el;
+ o = document.getElementById('option_container');
+ title_label = "<?php echo elgg_echo("title"); ?>";
+ bit = file_generate_bit(title_label,'title_','input-text','text',0);
+ o.appendChild(bit);
+ file_label = "<?php echo elgg_echo("file:file"); ?>";
+ bit = file_generate_bit(file_label,'upload_','input-file','file',30);
+ o.appendChild(bit);
+
+ number_of_files++;
+ document.file_form.number_of_files.value = number_of_files;
+}
</script> \ No newline at end of file