XtraUpload is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

xtraupload

Commit 304

User picture
  • Author: mglinski
  • 2010-12-30 05:39 (over 3 years ago)

Various bugs fixed
Upload progress bar is now more responsive and better animated

Files Affected

 
303304
1
function flashUpdate(total,remain,speed,per)
1
function flashUpdate(total,remain,speed,per)
2
{
2
{
 
 
3
    $("#progress_img").stop();
3
    if(total != '')
4
    if(total != '')
4
        $('#total').html(total);
5
        $('#total').html(total);
5
 
6
 
303304
119
        // Flash is really stupid in that it doesn't use the browser's cookies, but IE's cookies!! BAD FLASH, BAD!!!
119
        // Flash is really stupid in that it doesn't use the browser's cookies, but IE's cookies!! BAD FLASH, BAD!!!
120
        if(intval($user) != 0 && $this->session->userdata('login') != true)
120
        if(intval($user) != 0 && $this->session->userdata('login') != true)
121
        {
121
        {
 
 
122
            echo intval($user)."\n\n";
122
            $userobj = $this->users->getUserById(intval($user));
123
            $userobj = $this->users->getUserById(intval($user));
123
            $this->startup->getGroup($userobj->group);
124
            $this->startup->getGroup(intval($userobj->group));
124
            unset($userobj);
125
            unset($userobj);
125
        }
126
        }
126
 
127
 
303304
187
    public function getGroup($gid='')
187
    public function getGroup($gid='')
188
    {
188
    {
189
        if($gid != '')
189
        if($gid != '')
190
        {
190
        {
191
            $group = $gid;
191
            $this->group_config = $this->CI->db->get_where('groups', array('id' => intval($gid)))->row();
192
            $this->group_config = $this->CI->db->get_where('groups', array('id' => $group))->row();
 
 
193
            return;
192
            return;
194
        }
193
        }
195
        else
194
        else
303304
126
    </div>
126
    </div>
127
 
127
 
128
    <input id="fid" type="hidden" />
128
    <input id="fid" type="hidden" />
129
    <input id="uid" type="hidden" value="<?php echo ($this->session->userdata('id') ? $this->session->userdata('id') : 0 )?>" />
129
    <input id="uid" type="hidden" value="<?php echo (intval($this->session->userdata('id')) != 0 ? intval($this->session->userdata('id')) : 0 )?>" />
130
    <div id="filesHidden" style="display:none"></div>
130
    <div id="filesHidden" style="display:none"></div>
131
 
131
 
132
    <script type="text/javascript">
132
    <script type="text/javascript">
...
 
...
 
248
                flash_width : "1px", 
248
                flash_width : "1px", 
249
                flash_height : "1px", 
249
                flash_height : "1px", 
250
                flash_color : "#CCCCCC", 
250
                flash_color : "#CCCCCC", 
251
                debug: false,
251
                debug: true,
252
 
252
 
253
                // Button settings
253
                // Button settings
254
                button_image_url : "<?=$base_url.'img/flash_upload.png'?>",    // Relative to the SWF file
254
                button_image_url : "<?=$base_url.'img/flash_upload.png'?>",    // Relative to the SWF file
...
 
...
 
311
 
311
 
312
            $("#"+file.id+"-details").css('borderTop', 'none').show();
312
            $("#"+file.id+"-details").css('borderTop', 'none').show();
313
            $("#"+file.id).addClass('details').css('borderBottom', 'none');
313
            $("#"+file.id).addClass('details').css('borderBottom', 'none');
314
            $.scrollTo( $("#"+file.id), 300);
314
            //$.scrollTo( $("#"+file.id), 300);
315
            return true;
315
            return true;
316
        }
316
        }
317
 
317
 
...
 
...
 
356
            }
356
            }
357
            else
357
            else
358
            {
358
            {
359
                $.scrollTo( $("#uploader"), 800);
359
                $.scrollTo( $("#uploader"), 400);
360
            }
360
            }
361
        }
361
        }
362
    </script>
362
    </script>
303304
16
        </li>
16
        </li>
17
        <li>
17
        <li>
18
            <a href="<?=site_url('user/logout')?>">
18
            <a href="<?=site_url('user/logout')?>">
19
                <img src="<?=$base_url?>img/icons/log_in_16.png" class="nb" alt="" /> <?php echo $this->lang->line('global_logout')?>
19
                <img src="<?=$base_url?>img/icons/log_out_16.png" class="nb" alt="" /> <?php echo $this->lang->line('global_logout')?>
20
            </a>
20
            </a>
21
        </li>
21
        </li>
22
    </ul>
22
    </ul>