"MDL-13766, use normal button in upload form"
authorDongsheng Cai <unoter@gmail.com>
Thu, 6 May 2010 07:03:39 +0000 (07:03 +0000)
committerDongsheng Cai <unoter@gmail.com>
Thu, 6 May 2010 07:03:39 +0000 (07:03 +0000)
repository/filepicker.js
theme/base/style/core.css

index 1d50ac0..8b06c4a 100644 (file)
@@ -908,13 +908,14 @@ M.core_filepicker.init = function(Y, options) {
             str += '</select>';
             str += '</td>';
             str += '</tr></table>';
-            str += '<div class="fp-upload-btn"><a id="'+id+'_action" href="###" >'+M.str.repository.upload+'...</a></div>';
             str += '</form>';
+            str += '<div class="fp-upload-btn"><button id="'+id+'_action">'+M.str.repository.upload+'...</button></div>';
             str += '</div>';
             var upload_form = Y.Node.create(str);
             Y.one('#panel-'+client_id).appendChild(upload_form);
             var scope = this;
-            Y.one('#'+id+'_action').on('click', function() {
+            Y.one('#'+id+'_action').on('click', function(e) {
+                e.preventDefault(); 
                 Y.use('io-upload-iframe', function() {
                     scope.request({
                             scope: scope,
index 5069aee..23ed57a 100644 (file)
@@ -477,8 +477,6 @@ body.tag .managelink {padding: 5px;}
 .file-picker .fp-rename-form p {margin: 1em;}
 .file-picker .fp-upload-form {margin: 2em 0;text-align:center;}
 .file-picker .fp-upload-btn {clear:both;margin-top: 2em;}
-.file-picker .fp-upload-btn a {cursor: default;background: white;border:1px solid gray;color:black;padding: .5em;}
-.file-picker .fp-upload-btn a:hover {background: gray;color:white;}
 .file-picker .fp-paging {margin:1em .5em;clear:both;text-align:center;line-height: 2.5em;}
 .file-picker .fp-paging a {padding: .5em;border: 1px solid #CCC;}
 .file-picker .fp-paging a.cur_page {border: 1px solid blue;}
@@ -542,4 +540,4 @@ body.tag .managelink {padding: 5px;}
  .helppopup .yui3-widget-hd {float:right;margin:3px 3px 0 0;}
  .helppopup .yui3-widget-bd {margin:0 1em 1em 1em;border-top:1px solid #FFE691;}
  .helppopup .helpheading {font-size: 1em;}
- .helppopup .spinner {margin:1em;}
\ No newline at end of file
+ .helppopup .spinner {margin:1em;}