- Upload is getting some buttons.

This commit is contained in:
Gunther Brunner
2014-04-03 17:28:04 +09:00
parent 3799b51ad3
commit 95bc46d6b7
4 changed files with 69 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
module.exports = function UploadCtrl($scope, $rootScope) {
module.exports = function UploadCtrl($scope, $rootScope, SettingsService) {
$scope.installation = null
@@ -25,4 +25,17 @@ module.exports = function UploadCtrl($scope, $rootScope) {
})
})
}
//
// $scope.installEnabled = true
// SettingsService.bind($scope, {
// key: 'installEnabled',
// storeName: 'Upload'
// })
//
// //$scope.launchEnabled = true
// SettingsService.bind($scope, {
// key: 'launchEnabled',
// storeName: 'Upload'
// })
}

View File

@@ -1,3 +1,23 @@
.stf-upload {
.stf-upload .btn-file {
position: relative;
overflow: hidden;
}
.stf-upload .btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 999px;
text-align: right;
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
.stf-upload .drop-area {
}

View File

@@ -3,7 +3,35 @@
i.fa.fa-upload
span(translate) Upload
clear-button(ng-click='clear()', ng-disabled='!installation').btn-xs
label.checkbox-inline.pull-right
input(type='checkbox', ng-model='launchEnabled', ng-disabled='true')
span Launch
label.checkbox-inline.pull-right
input(type='checkbox', ng-model='installEnabled', ng-disabled='true')
span Install
.widget-content.padded
.input-group.form-inline
input(type=text, ng-model='url', ng-enter='$root.install(url)', placeholder='http://...').form-control
span.input-group-btn
button.btn.btn-primary-outline(ng-click='$root.install(url)', tooltip='Upload From Link')
i.fa.fa-upload
.drop-area(ng-file-drop='$root.install($files)')
i.fa.fa-2x.fa-upload.drop-area-icon
p.drop-area-text Drop here
.drop-area-buttons
.btn.btn-primary-outline.file-input.btn-file.btn-sm
i.fa.fa-file
span Choose File
input(type='file', ng-file-select='$root.install($files)')
button.btn.btn-primary-outline.btn-sm
i.fa.fa-link
span Use Link
div(ng-if='installation')
p
strong {{ installation.lastData }}