Skip to content

Commit

Permalink
uploadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
cjy37 committed Oct 19, 2017
1 parent b0eb240 commit 41c94eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bootstrap-table.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bootstrap-table.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "join-admin",
"version": "1.0.13",
"description": "join admin project",
"name": "angular-schema-form-table",
"version": "1.0.14",
"description": "table add-on for schema form",
"main": "app.js",
"keywords": [
"mos"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-schema-form-table",
"version": "1.0.13",
"version": "1.0.14",
"description": "table add-on for schema form",
"scripts": {
"test": "rm -fr coverage && ./node_modules/karma/bin/karma start --single-run --browsers PhantomJS karma.conf.js"
Expand Down
9 changes: 5 additions & 4 deletions src/uploadfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
ng-init="form.options.resultKey='url' ; form.options.progressKey='progress' ; form.options.errorMsgKey='errorMsg'" ng-class="{'has-error': form.disableErrorState !== true && hasError(), 'has-success': form.disableSuccessState !== true && hasSuccess(), 'has-feedback': form.feedback !== false }">
<label class="control-label {{form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle(), 'schema-form-required': form.inputrequired === true}" for="{{form.key.slice(-1)[0]}}">{{form.title}}<span ng-if="form.inputrequired === true" class="join-required"></span></label>
<div class="joininputcol" ng-class="form.fieldHtmlClass">
<div class="uploadfilebody"><a class="uploadfilecls" ng-if="form.options.showThumb" href="{{$$value$$}}" target="_blank">{{$$value$$.substring($$value$$.lastIndexOf('/')+1)}}</a>
<div class="uploadfilebody">
<a class="btn btn-success uploadfilebuttom" ngf-select ngf-change="form.options.uploadPic($file, form.options, arrayIndex)"
ngf-fix-orientation="true" ngf-validate="form.options.uploadvalidate?form.options.uploadvalidate:{size: {max: '20MB', min: '10B'}}" ng-class="form.class" tabindex="-1">
<span ng-if="!$file[form.options.resultKey]">上传文件</span>
<span ng-if="!$file[form.options.resultKey]" ng-bind="$$value$$ ? '重新上传':'上传文件'"></span>
<span class="file-progress" ng-if="!$file[form.options.resultKey]"
ng-show="$file[form.options.progressKey] >= 0">
<span style="width:{{$file[form.options.progressKey]}}%"
ng-bind="$file[form.options.progressKey] + '%'"> </span>
</span>
<span ng-show="$file[form.options.resultKey]">上传成功</span>
</a>
</a> <span class="uploadfilecls" ng-if="form.options.showThumb && form.options.fileName"> 已上传: {{form.options.fileName}}</span>
<br ng-if="form.options.suggestBottom" />
<span class="uploadfilelabel" ng-if="form.options.suggestlabel" ng-style="{'padding-left': (form.options.suggestBottom? '0px' : '10px')}" ng-bind="form.options.suggestlabel"></span></div>
<span class="uploadfilelabel" ng-if="form.options.suggestlabel" ng-style="{'padding-left': (form.options.suggestBottom? '0px' : '10px')}" ng-bind="form.options.suggestlabel"></span>
</div>
<span ng-if="$file[form.options.errorMsgKey]" class="sr-only">错误: {{$file[form.options.errorMsgKey]}}</span>
<div class="help-block" sf-message="form.description"></div></div>
</div>

0 comments on commit 41c94eb

Please sign in to comment.