forked from WISE-Community/WISE-DEPRECATED
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from WISE-Community/issue-36-refactor-at-contr…
…ollers-info-asset-notebook-milestones-wiselink Converted remaining AT controllers into components
- Loading branch information
Showing
17 changed files
with
416 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
src/assets/wise5/authoringTool/asset/assetAuthoring.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<style> | ||
md-dialog { | ||
display: initial; | ||
width: 80%; | ||
} | ||
.drop-box { | ||
background: #F8F8F8; | ||
border: 5px dashed #DDD; | ||
width: 90%; | ||
height: 100px; | ||
text-align: center; | ||
padding-top: 50px; | ||
margin: 10px; | ||
bottom: 0px; | ||
} | ||
.drop-box:hover { | ||
cursor: pointer; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0px; | ||
margin: 0px; | ||
} | ||
li { | ||
padding-left: 20px; | ||
} | ||
li:hover { | ||
cursor: pointer; | ||
} | ||
#uploadSuccessMessage { | ||
background-color: lightgreen; | ||
} | ||
#errorMessage { | ||
background-color: lightpink; | ||
} | ||
</style> | ||
|
||
<div ngf-drop ngf-select | ||
ngf-change="$ctrl.uploadAssetItems($files)" class="drop-box" | ||
ngf-resize="{quality: .8, width: 1000, height: 1000, pattern:'image/*', restoreExif: true}" | ||
ngf-resize-if="$width > 1000 || $height > 1000" | ||
drag-over-class="dragover" ngf-multiple="true" allow-dir="false" | ||
accept="image/*,application/pdf,text/csv,text/javascript" translate="dropAssetMessage"></div> | ||
<span translate="assetUsageMessage" | ||
translate-value-usage="{{$ctrl.totalFileSize | appropriateSizeText }}" | ||
translate-value-max="{{$ctrl.projectAssetTotalSizeMax | appropriateSizeText }}" | ||
translate-value-percentage="{{$ctrl.projectAssetUsagePercentage | roundToDecimal:0 }}"></span> | ||
<span ng-if="$ctrl.totalUnusedFilesSize != null && $ctrl.totalUnusedFilesSize != 0" | ||
style="color:red">({{ ::'unusedFiles' | translate }} {{$ctrl.totalUnusedFilesSize | appropriateSizeText}} ({{$ctrl.unusedFilesPercentage | roundToDecimal:0}}%)) | ||
</span> | ||
<div id="uploadSuccessMessage"> | ||
{{$ctrl.uploadSuccessMessage}} | ||
<div ng-repeat='successFile in $ctrl.successFiles'> | ||
<b>{{::successFile.filename}}</b> | ||
</div> | ||
</div> | ||
<div id="errorMessage"> | ||
{{$ctrl.uploadErrorMessage}} | ||
<div ng-repeat='errorFile in $ctrl.errorFiles'> | ||
<b>{{::errorFile.filename}}</b> {{::errorFile.message}} | ||
</div> | ||
</div> | ||
<span translate="sortAssets"></span>: <select ng-model="$ctrl.assetSortBy" | ||
ng-change="$ctrl.assetSortByChanged()"> | ||
<option value="aToZ" translate="fileNameAToZ"></option> | ||
<option value="zToA" translate="fileNameZToA"></option> | ||
<option value="smallToLarge" translate="fileSizeSmallToLarge"></option> | ||
<option value="largeToSmall" translate="fileSizeLargeToSmall"></option> | ||
</select> | ||
<div style='display:flex'> | ||
<div style='flex:1; height:500px; overflow-y:scroll;'> | ||
<ul> | ||
<li ng-repeat='assetItem in $ctrl.projectAssets.files' | ||
class='assetItem' | ||
ng-click='$ctrl.assetClicked($event, assetItem)' | ||
ng-mouseover='$ctrl.previewAsset($event, assetItem)' | ||
ng-style="$ctrl.selectedAssetItem === assetItem ? { 'backgroundColor': 'yellow'} : { 'backgroundColor': '' }" | ||
ng-if='($ctrl.allowedFileTypes.includes("any") || $ctrl.allowedFileTypes.includes(assetItem.fileType))'> | ||
<span>{{::assetItem.fileName}} ({{::assetItem.fileSize | appropriateSizeText}})</span> | ||
<button ng-click='$ctrl.chooseAsset(assetItem)' ng-show='$ctrl.isPopup'>Choose</button> | ||
<span> | ||
<md-tooltip md-direction="top"><span translate="download"></span></md-tooltip> | ||
<md-icon ng-click="$ctrl.downloadAsset(assetItem)">file_download</md-icon> | ||
</span> | ||
<md-icon ng-click='$ctrl.deleteAsset(assetItem)'>delete</md-icon> | ||
<span ng-if="!assetItem.used"> | ||
<span style="color:red">({{ ::'notUsed' | translate }})</span> | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
<div style='flex:1;'> | ||
<div> | ||
<img ng-src='{{$ctrl.previewAssetURL}}' ng-show='$ctrl.assetIsImage' style='max-width: 400px'/> | ||
<video ng-show='$ctrl.assetIsVideo' style='max-width: 400px' controls> | ||
<source ng-src='{{$ctrl.previewAssetURL}}' type='video/mp4'> | ||
</video> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.