Browse Source

Added "Upload" button in control bar.

pull/72/head
Joachim Bauch 12 years ago
parent
commit
72386d98f2
  1. 5
      src/styles/components/_presentation.scss
  2. 9
      static/js/directives/presentation.js
  3. 6
      static/partials/presentation.html

5
src/styles/components/_presentation.scss

@ -122,13 +122,16 @@ @@ -122,13 +122,16 @@
color: #333;
margin-top: 20px;
width: 160px;
height: 122px;
display: inline-block;
margin-left: 20px;
cursor: pointer;
position: relative;
vertical-align: middle;
}
.presentation .thumbnail:first-child {
cursor: default;
margin-left: 0;
}
@ -149,6 +152,8 @@ @@ -149,6 +152,8 @@
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
text-align: center;
}

9
static/js/directives/presentation.js

@ -403,6 +403,15 @@ define(['jquery', 'underscore', 'text!partials/presentation.html'], function($, @@ -403,6 +403,15 @@ define(['jquery', 'underscore', 'text!partials/presentation.html'], function($,
return namespace + "_" + $scope.myid;
};
var uploadBinder = fileUpload.bindClick(namespace, $element.find('.thumbnail button')[0], function(files) {
console.log("Files selected", files);
filesSelected(files);
});
uploadBinder.namespace = function() {
// Inject own id into namespace.
return namespace + "_" + $scope.myid;
};
$scope.showPresentation = function() {
console.log("Presentation active");
$scope.layout.presentation = true;

6
static/partials/presentation.html

@ -28,6 +28,12 @@ @@ -28,6 +28,12 @@
</div>
</div>
<div class="presentations nicescroll" ng-show="visibleSharedFiles.length">
<div class="thumbnail">
<div class="fa filetype fa-plus"></div>
<div class="caption">
<button class="btn btn-primary">{{_('Upload')}}</button>
</div>
</div>
<div class="thumbnail" ng-repeat="info in visibleSharedFiles | orderBy : 'sortkey'" ng-click="selectPresentation(info)" title="{{ info.name }}">
<div class="fa active fa-check" ng-show="info.id === currentFileInfo.id"></div>
<a class="btn btn-danger delete" ng-click="deletePresentation($event, info)"><i class="fa fa-trash-o fa-lg"></i></a>

Loading…
Cancel
Save