diff --git a/.htaccess b/.htaccess index 23c90b26d8c..92825ea92d5 100644 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,5 @@ ErrorDocument 404 //owncloud/core/templates/404.php -php_value upload_max_filesize 2048G -php_value post_max_size 2048G +php_value upload_max_filesize 512M +php_value post_max_size 512M SetEnv htaccessWorking true Options -Indexes diff --git a/admin/templates/users.php b/admin/templates/users.php index 8d6b1efe6e2..77a4f0c0d57 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -6,8 +6,8 @@ foreach($_["groups"] as $group) { ?> - - + + '; if(name.indexOf('.')!=-1){ var basename=name.substr(0,name.indexOf('.')); @@ -38,7 +38,7 @@ FileList={ }, addDir:function(name,size,lastModified){ var html=''; - html+=''; + html+=''; if(size!='Pending'){ simpleSize=simpleFileSize(size); }else{ diff --git a/files/js/files.js b/files/js/files.js index 950f06a31a1..8fdbd418462 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -13,10 +13,14 @@ $(document).ready(function() { $('#plugins>ul>li:first-child').droppable(crumbDropOptions); // Triggers invisible file input - $('#file_upload_button_wrapper').bind('click', function() { - $('#file_upload_start').trigger('click'); + $('.file_upload_button_wrapper').live('click', function() { + $(this).parent().children('.file_upload_start').trigger('click'); return false; }); + + $('#file_upload_button_wrapper').tipsy({gravity:'e'}); + $('td.filesize').tipsy({gravity:'se', live:true}); + $('td .modified').tipsy({gravity:'s', live:true}); // Sets the file-action buttons behaviour : $('tr').live('mouseenter',function(event) { @@ -419,5 +423,5 @@ function getMimeIcon(mime){ if(knownMimes.indexOf(mime)==-1){ mime='file'; } - return OC.imagePath('core','mimetypes/'+mime+'.png'); + return OC.imagePath('core','filetypes/'+mime); } diff --git a/files/templates/index.php b/files/templates/index.php index 008051492d0..f5a212add48 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -6,10 +6,9 @@
- - - + + +
@@ -33,8 +32,8 @@ Share - - + + diff --git a/lib/base.php b/lib/base.php index 2e735514347..dc3ed4129cd 100644 --- a/lib/base.php +++ b/lib/base.php @@ -148,12 +148,15 @@ OC_Group::setBackend( OC_Config::getValue( "groupbackend", "database" )); // Add the stuff we need always OC_Util::addScript( "jquery-1.6.2.min" ); OC_Util::addScript( "jquery-ui-1.8.14.custom.min" ); +OC_Util::addScript( "jquery-showpassword" ); +OC_Util::addScript( "jquery-tipsy" ); OC_Util::addScript( "js" ); OC_Util::addScript( "multiselect" ); OC_Util::addScript('search','result'); -OC_Util::addStyle( "jquery-ui-1.8.14.custom" ); OC_Util::addStyle( "styles" ); OC_Util::addStyle( "multiselect" ); +OC_Util::addStyle( "jquery-ui-1.8.14.custom" ); +OC_Util::addStyle( "jquery-tipsy" ); // Load Apps // This includes plugins for users and filesystems as well diff --git a/lib/config.php b/lib/config.php index 16e9ea441d5..dafb37edd33 100644 --- a/lib/config.php +++ b/lib/config.php @@ -177,8 +177,13 @@ class OC_Config{ $content .= ");\n?>\n"; // Write the file - file_put_contents( "$SERVERROOT/config/config.php", $content ); - + $result=@file_put_contents( "$SERVERROOT/config/config.php", $content ); + if(!$result) { + $tmpl = new OC_Template( '', 'error', 'guest' ); + $tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by setting the owner of 'config' to the user that the web server uses (".exec('whoami').")"))); + $tmpl->printPage(); + exit; + } return true; } } diff --git a/lib/crypt.php b/lib/crypt.php index 83e6ac4cde0..de1f6c73387 100755 --- a/lib/crypt.php +++ b/lib/crypt.php @@ -61,7 +61,7 @@ class OC_Crypt { // Write the file $username=OC_USER::getUser(); - file_put_contents(OC_Config::getValue( "datadirectory").'/'.$username.'/encryption.key', $enckey ); + @file_put_contents(OC_Config::getValue( "datadirectory").'/'.$username.'/encryption.key', $enckey ); } } diff --git a/lib/files.php b/lib/files.php index eec1007de1f..bdcae419189 100644 --- a/lib/files.php +++ b/lib/files.php @@ -121,7 +121,7 @@ class OC_Files { $filename=$dir.'/'.$files; } if($zip or OC_Filesystem::is_readable($filename)){ - header('Content-Disposition: attachment; filename='.basename($filename)); + header('Content-Disposition: attachment; filename="'.basename($filename).'"'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index 750edf17696..b9b2417ad9a 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -6,33 +6,32 @@ require_once('../../lib/base.php'); $l=new OC_L10N('settings'); // We send json data -header( "Content-Type: application/jsonrequest" ); +header("Content-Type: application/jsonrequest"); // Check if we are a user -if( !OC_User::isLoggedIn()){ - echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t( "Authentication error" ) ))); +if(!OC_User::isLoggedIn()){ + echo json_encode(array("status" => "error", "data" => array("message" => $l->t("Authentication error")))); exit(); } // Get data -if( !isset( $_POST["password"] ) && !isset( $_POST["oldpassword"] )){ - echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t( "You have to enter the old and the new password!" ) ))); +if(!isset($_POST["password"]) && !isset($_POST["oldpassword"])){ + echo json_encode(array("status" => "error", "data" => array("message" => $l->t("You have to enter the old and the new password!")))); exit(); } // Check if the old password is correct -if( !OC_User::checkPassword( $_SESSION["user_id"], $_POST["oldpassword"] )){ - echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Your old password is wrong!") ))); +if(!OC_User::checkPassword($_SESSION["user_id"], $_POST["oldpassword"])){ + echo json_encode(array("status" => "error", "data" => array("message" => $l->t("Your old password is wrong!")))); exit(); } // Change password -if( OC_User::setPassword( $_SESSION["user_id"], $_POST["password"] )){ - echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Password changed") ))); - OC_Crypt::changekeypasscode( $_POST["password"]) { -} -else{ - echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Unable to change password") ))); +if(OC_User::setPassword($_SESSION["user_id"], $_POST["password"])){ + echo json_encode(array("status" => "success", "data" => array("message" => $l->t("Password changed")))); + OC_Crypt::changekeypasscode($_POST["password"]); +}else{ + echo json_encode(array("status" => "error", "data" => array("message" => $l->t("Unable to change password")))); } ?>
"); + + // Name added for JQuery Validation compatibility + // Element name is required to avoid script warning. + $clone.attr({ + 'type' : 'text', + 'class' : $element.attr('class'), + 'style' : $element.attr('style'), + 'size' : $element.attr('size'), + 'name' : $element.attr('name')+'-clone', + 'tabindex' : $element.attr('tabindex') + }); + + return $clone; + + }; + + // Transfers values between two elements + var update = function(a,b){ + b.val(a.val()); + }; + + // Shows a or b depending on checkbox + var setState = function( checkbox, a, b ){ + + if(checkbox.is(':checked')){ + update(a,b); + b.show(); + a.hide(); + } else { + update(b,a); + b.hide(); + a.show(); + } + + }; + + return this.each(function() { + + var $input = $(this), + $checkbox = $($input.data('typetoggle')); + + // Create clone + var $clone = cloneElement($input); + $clone.insertAfter($input); + + // Set callback arguments + if(callback.fn){ + callback.args.input = $input; + callback.args.checkbox = $checkbox; + callback.args.clone = $clone; + } + + + + $checkbox.bind('click', function() { + setState( $checkbox, $input, $clone ); + }); + + $input.bind('keyup', function() { + update( $input, $clone ) + }); + + $clone.bind('keyup', function(){ + update( $clone, $input ); + + // Added for JQuery Validation compatibility + // This will trigger validation if it's ON for keyup event + $input.trigger('keyup'); + + }); + + // Added for JQuery Validation compatibility + // This will trigger validation if it's ON for blur event + $clone.bind('blur', function() { $input.trigger('focusout'); }); + + setState( $checkbox, $input, $clone ); + + if( callback.fn ){ + callback.fn( callback.args ); + } + + }); + } + }); +})(jQuery); diff --git a/core/js/jquery-tipsy.js b/core/js/jquery-tipsy.js new file mode 100644 index 00000000000..58d834771ff --- /dev/null +++ b/core/js/jquery-tipsy.js @@ -0,0 +1,108 @@ +// tipsy - Facebook-style tooltip plugin for jQuery +// (c) 2008-2009 Jason Frame (jason@onehackoranother.com) +// Released under The MIT License. + +(function($) { + $.fn.tipsy = function(options) { + + options = $.extend({}, $.fn.tipsy.defaults, options); + + return this.each(function() { + + var opts = $.fn.tipsy.elementOptions(this, options); + + $(this).hover(function() { + + $.data(this, 'cancel.tipsy', true); + + var tip = $.data(this, 'active.tipsy'); + if (!tip) { + tip = $('
'); + tip.css({position: 'absolute', zIndex: 100000}); + $.data(this, 'active.tipsy', tip); + } + + if ($(this).attr('title') || typeof($(this).attr('original-title')) != 'string') { + $(this).attr('original-title', $(this).attr('title') || '').removeAttr('title'); + } + + var title; + if (typeof opts.title == 'string') { + title = $(this).attr(opts.title == 'title' ? 'original-title' : opts.title); + } else if (typeof opts.title == 'function') { + title = opts.title.call(this); + } + + tip.find('.tipsy-inner')[opts.html ? 'html' : 'text'](title || opts.fallback); + + var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight}); + tip.get(0).className = 'tipsy'; // reset classname in case of dynamic gravity + tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); + var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight; + var gravity = (typeof opts.gravity == 'function') ? opts.gravity.call(this) : opts.gravity; + + switch (gravity.charAt(0)) { + case 'n': + tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north'); + break; + case 's': + tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south'); + break; + case 'e': + tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east'); + break; + case 'w': + tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west'); + break; + } + + if (opts.fade) { + tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 0.8}); + } else { + tip.css({visibility: 'visible'}); + } + + }, function() { + $.data(this, 'cancel.tipsy', false); + var self = this; + setTimeout(function() { + if ($.data(this, 'cancel.tipsy')) return; + var tip = $.data(self, 'active.tipsy'); + if (opts.fade) { + tip.stop().fadeOut(function() { $(this).remove(); }); + } else { + tip.remove(); + } + }, 100); + + }); + + }); + + }; + + // Overwrite this method to provide options on a per-element basis. + // For example, you could store the gravity in a 'tipsy-gravity' attribute: + // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); + // (remember - do not modify 'options' in place!) + $.fn.tipsy.elementOptions = function(ele, options) { + return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; + }; + + $.fn.tipsy.defaults = { + fade: false, + fallback: '', + gravity: 'n', + html: false, + title: 'title' + }; + + $.fn.tipsy.autoNS = function() { + return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; + }; + + $.fn.tipsy.autoWE = function() { + return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; + }; + +})(jQuery); diff --git a/core/js/js.js b/core/js/js.js index 30cf01d0b22..677cd5fbb7f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -283,12 +283,25 @@ $(document).ready(function(){ }); if($('body').attr("id")=="body-user") { $('#settings #expanddiv').hide(); } - $('#settings #expand').click(function() { + $('#settings #expand').click(function(event) { $('#settings #expanddiv').slideToggle(); + event.stopPropagation(); }); + $('#settings #expanddiv').click(function(event){ + event.stopPropagation(); + }) $('#settings #expand').hover(function(){ $('#settings #expand+span').fadeToggle(); - }) + }); + $(window).click(function(){//hide the settings menu when clicking oustide it + if($('body').attr("id")=="body-user"){ + $('#settings #expanddiv').slideUp(); + } + }); + + $('.file_action').tipsy({gravity:'s', live:true}); + $('.selectedActions a').tipsy({gravity:'n', live:true}); + $('.selectedActions a.delete').tipsy({gravity: 'ne', live:true}); }); if (!Array.prototype.map){ @@ -314,118 +327,3 @@ if (!Array.prototype.map){ return res; }; } - - -/* -* @name Show Password -* @descripton -* @version 1.3 -* @requires Jquery 1.5 -* -* @author Jan Jarfalk -* @author-email jan.jarfalk@unwrongest.com -* @author-website http://www.unwrongest.com -* -* @special-thanks Michel Gratton -* -* @licens MIT License - http://www.opensource.org/licenses/mit-license.php -*/ -(function($){ - $.fn.extend({ - showPassword: function(c) { - - // Setup callback object - var callback = {'fn':null,'args':{}} - callback.fn = c; - - // Clones passwords and turn the clones into text inputs - var cloneElement = function( element ) { - - var $element = $(element); - - $clone = $(""); - - // Name added for JQuery Validation compatibility - // Element name is required to avoid script warning. - $clone.attr({ - 'type' : 'text', - 'class' : $element.attr('class'), - 'style' : $element.attr('style'), - 'size' : $element.attr('size'), - 'name' : $element.attr('name')+'-clone', - 'tabindex' : $element.attr('tabindex') - }); - - return $clone; - - }; - - // Transfers values between two elements - var update = function(a,b){ - b.val(a.val()); - }; - - // Shows a or b depending on checkbox - var setState = function( checkbox, a, b ){ - - if(checkbox.is(':checked')){ - update(a,b); - b.show(); - a.hide(); - } else { - update(b,a); - b.hide(); - a.show(); - } - - }; - - return this.each(function() { - - var $input = $(this), - $checkbox = $($input.data('typetoggle')); - - // Create clone - var $clone = cloneElement($input); - $clone.insertAfter($input); - - // Set callback arguments - if(callback.fn){ - callback.args.input = $input; - callback.args.checkbox = $checkbox; - callback.args.clone = $clone; - } - - - - $checkbox.bind('click', function() { - setState( $checkbox, $input, $clone ); - }); - - $input.bind('keyup', function() { - update( $input, $clone ) - }); - - $clone.bind('keyup', function(){ - update( $clone, $input ); - - // Added for JQuery Validation compatibility - // This will trigger validation if it's ON for keyup event - $input.trigger('keyup'); - - }); - - // Added for JQuery Validation compatibility - // This will trigger validation if it's ON for blur event - $clone.bind('blur', function() { $input.trigger('focusout'); }); - - setState( $checkbox, $input, $clone ); - - if( callback.fn ){ - callback.fn( callback.args ); - } - - }); - } - }); -})(jQuery); diff --git a/core/js/listview.js b/core/js/listview.js new file mode 100644 index 00000000000..e3e5ebdab8f --- /dev/null +++ b/core/js/listview.js @@ -0,0 +1,71 @@ +function ListView(element){ + this.element=element; +} + +ListView.generateTable=function(collumns){ + var html=''; + html+=''; + $.each(collumns,function(index,collumn){ + html+=''; + }); + html+=''; + html+=''; + html+=''; + html+'' + $.each(collumns,function(index,collumn){ + html+='' + html+=''; + html='
'+collumn+'
'; + }); + html+'
'; + return $(html); +} + +ListView.prototype={ + rows:{}, + hoverElements:{}, + addRow:function(id,data,extraData){ + var tr=this.element.find('tr.template').clone(); + tr.removeClass('template'); + $.each(data,function(name,value){ + tr.children('td.'+name).text(value); + tr.attr('data-'+name,value); + }); + $.each(extraData,function(name,value){ + tr.attr('data-'+name,value); + }); + this.rows[id]=data; + tr.data('id',id); + this.element.children('tbody').append(tr); + }, + removeRow:function(id){ + this.rows[id].remove(); + delete this.rows[id]; + }, + hoverHandeler:function(tr){ + $.each(this.hoverElement,function(index,collumn){ + $.each(collumn,function(index,element){ + var html=''; + var element=$(html); + element.append($('')); + element.click(element.callback); + tr.children('td.'+collumn).append(element) + }); + }); + if(this.deleteCallback){ + + } + }, + hoverHandelerOut:function(tr){ + tr.find('*.hoverElement').remove(); + }, + addHoverElement:function(collumn,icon,title,callback){ + if(!this.hoverElements[collumn]){ + this.hoverElements[collumn]=[]; + } + this.hoverElements[row].push({icon:icon,callback:callback,title:title}); + }, + empty:function(){ + this.element.children('tr:not(.template)').remove(); + } +} \ No newline at end of file diff --git a/files/css/files.css b/files/css/files.css index e878cc01d03..9fcc24a80af 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -11,7 +11,7 @@ #fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } .file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .3em; padding-left:2em; } .file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin-right:1.5em;} -.file_upload_wrapper #file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } +.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; } #file_newfolder_name { background-image:url('../../core/img/places/folder.svg'); font-weight:bold; width:8em; } .file_upload_start, .file_upload_filename { font-size:1em; } @@ -26,9 +26,13 @@ /* FILE TABLE */ span#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; } table { position:relative; top:37px; width:100%; } -tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; height:1em; } +table tr { -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; } +tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#f8f8f8; height:1em; } +tbody tr.selected { background-color:#eee; } tbody a { color:#000; } span.extention, td.date { color:#999; } +span.extention { opacity:0; -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } +tr:hover span.extention { opacity:1; } div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; } div.crumb:first-child { padding-left:1.5em; } div.crumb:last-child { font-weight:bold; } @@ -38,22 +42,23 @@ table th .name { float:left; margin-left:.5em; } table th.multiselect { background:#ddd; color:#000; font-weight:bold; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; } -table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:right; } +table th#headerSize, table td.filesize { width:3em; padding:0 1em; text-align:right; } table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; } table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; } table tr[data-type="dir"] td.filename a.name {font-weight:bold; } -table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text } +table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text; } table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; } table td.filename .nametext, .modified { float:left; padding:.3em 0; } table td.filename .nametext { width:60%; } table td.filename form { float:left; font-size:.85em; } -table thead.fixed tr{position:fixed; top:6.3em; z-index:49; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000;} -table thead.fixed {height:2em} -#fileList tr td.filename>input[type=checkbox]:first-child { display:none; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ } -#fileList tr td.filename>input[type=checkbox]:checked:first-child, #fileList tr:hover td.filename>input[type=checkbox]:first-child { display:inline; } -#fileList tr.selected td.filename , #fileList tr:hover td.filename { background-image:none !important } -#select_all { float:left; margin:0.2em; margin-left:0.6em; } +table thead.fixed tr{ position:fixed; top:6.3em; z-index:49; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } +table thead.fixed { height:2em; } +#fileList tr td.filename>input[type=checkbox]:first-child { opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 500ms; -moz-transition:opacity 500ms; -o-transition:opacity 500ms; transition:opacity 500ms; } +#fileList tr td.filename>input[type="checkbox"]:checked:first-child, #fileList tr:hover td.filename>input[type="checkbox"]:first-child { opacity:1; } +#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; } +#fileList tr.selected td.filename, #fileList tr:hover td.filename { background-image:url('') !important; } +#select_all { float:left; margin:.2em; margin-left:.6em; } #uploadsize-message,#delete-confirm { display:none; } .selectedActions a, a.file_action { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; } .selectedActions { display:none; } diff --git a/files/js/fileactions.js b/files/js/fileactions.js index 744ffd8cfed..2bc79abe723 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -53,6 +53,7 @@ FileActions={ }, display:function(parent){ FileActions.currentFile=parent; + $('.file_action').remove(); var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType()); var file=FileActions.getCurrentFile(); if($('tr[data-file="'+file+'"]').data('renaming')){ @@ -100,10 +101,14 @@ FileActions={ }); parent.parent().children().last().append(element); } + $('.file_action').hide(); + $('.file_action').fadeIn(200); return false; }, hide:function(){ - $('.file_action').remove(); + $('.file_action').fadeOut(200,function(){ + $(this).remove(); + }); }, getCurrentFile:function(){ return FileActions.currentFile.parent().attr('data-file'); @@ -128,7 +133,7 @@ FileActions.register('all','Rename',OC.imagePath('core','actions/rename'),functi FileList.rename(filename); }); -FileActions.setDefault('all','Download'); +//FileActions.setDefault('all','Download'); FileActions.register('dir','Open','',function(filename){ window.location='index.php?dir='+$('#dir').val()+'/'+filename; diff --git a/files/js/filelist.js b/files/js/filelist.js index 50a995bf254..b89bc9b57b6 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -3,7 +3,7 @@ FileList={ $('#fileList').empty().html(fileListHtml); }, addFile:function(name,size,lastModified,loading){ - var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file.png'); + var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file'); var html='
'+name+''+name+' t( 'Size MB' ); ?>t( 'Modified' ); ?><?php echo $l->t('Delete')?>t( 'Size' ); ?>t( 'Modified' ); ?><?php echo $l->t('Delete')?>