Fix et2_file upload

This commit is contained in:
Hadi Nategh 2016-04-08 13:47:05 +00:00
parent 8325963b06
commit 27b9ea6640
3 changed files with 22 additions and 22 deletions

View File

@ -180,7 +180,9 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
$j(span).removeClass('et2_file_spanActive');
}
});
var self = this;
// trigger native input upload file
this.span.click(function(){self.input.click()});
// Check for File interface, should fall back to normal form submit if missing
if(typeof File != "undefined" && typeof (new XMLHttpRequest()).upload != "undefined")
{

View File

@ -579,7 +579,6 @@ div.et2_file {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
max-height: 300px;
width: 181px !important;
z-index: 201 !important;
box-shadow: 6px 6px 9px gray;
}
@ -593,15 +592,17 @@ div.et2_file {
.et2_file .progress {
width: 300px;
max-height: 6em;
max-height: 12em;
overflow: auto;
margin-left: 20px;
padding: 8px;
}
.et2_file .progress span.progressBar {
height: 5px;
width: 150px;
max-width: 150px;
display: inline;
border:none;
}
/* Remove icon displayed when hovering */
.et2_file .progress li div.remove {
@ -647,11 +648,7 @@ span.et2_file_span{
margin-top:0;
}
div.et2_file input.et2_file_upload{
position: absolute;
top: 4px;
cursor: pointer;
width: 98%;
opacity: 0;
display: none;
}
/**
* Autocomplete - used in link widget
@ -719,16 +716,15 @@ div.et2_link_entry input.ui-autocomplete-input {
.et2_link_to {
overflow-x: visible;
}
.et2_link_to > div {display: inline-block; margin-right:5px;}
.et2_link_to > div {display: inline-block; margin-right:5px;vertical-align: top;}
.et2_link_to.et2_toolbar {margin-top:5px !important;}
.et2_link_to.et2_toolbar {margin-top:10px !important;}
.et2_link_to.et2_toolbar div.et2_link_entry input.ui-autocomplete-input {
padding-bottom: 4px;
height:16px;
height:22px;
border-radius: 3px;
}
.et2_link_to.et2_toolbar .div_link {width:85%;}
.et2_link_to.et2_toolbar .div_link {width:85%;vertical-align: top;}
.et2_link_to.et2_toolbar .div_link select {margin-right: 4px;}
.et2_link_to button {
display: inline;
@ -750,6 +746,7 @@ div.et2_link_entry input.ui-autocomplete-input {
.et2_link_to .progress {
max-height: 12em;
overflow-y: auto;
padding:8px;
}
.et2_link_to .progress > .success input {
width: 100%;
@ -777,25 +774,29 @@ div.et2_link_entry input.ui-autocomplete-input {
.et2_link_to button.et2_vfs_btn{
width:24px;
height:24px;
background-position: center;
background-size: 16px;
padding:0 !important;
vertical-align: bottom;
margin:0;
margin-top:1px;
z-index: 999;
}
.et2_link_to div.et2_file,
.et2_link_to.et2_toolbar div.et2_file,
.et2_link_to.et2_toolbar div.et2_file {width:22px;}
.et2_link_to.et2_toolbar span.et2_file_span {
width:22px;
height: 22px;
background-position: center;
}
.et2_link_to.et2_toolbar div.et2_file {
vertical-align: middle;
margin-top: -4px;
vertical-align: bottom;
padding-right: 2px;
}
.et2_link_to.et2_toolbar button.link {float:right;}
.et2_link_to.et2_toolbar span.et2_file_span { padding-right: 0;}
.et2_link_to.et2_toolbar .et2_file_upload {padding: 0;margin: 0;}
.et2_link {
cursor: pointer;
color: #003075;

View File

@ -169,9 +169,6 @@
<column/>
</columns>
<rows>
<row class="th" disabled="@view">
<description value="Create new links" span="all"/>
</row>
<row disabled="@view">
<link-to id="link_to" span="all"/>
</row>