diff options
| author | Eole <EoleDev@outlook.fr> | 2016-05-09 23:38:13 +0200 |
|---|---|---|
| committer | Eole <EoleDev@outlook.fr> | 2016-05-09 23:38:13 +0200 |
| commit | f3cbeeb408f6c624accdcf7187caf65600805052 (patch) | |
| tree | 7ebe41465939e68a2534c5ea74d699488d003d48 | |
| parent | 101514691290c0dc1d401c1aa34ad2fffcd77c28 (diff) | |
Css Progress, File Name..
| -rwxr-xr-x | client/js/controllers/image/edit.js | 4 | ||||
| -rwxr-xr-x | client/partials/image/edit.html | 4 | ||||
| -rwxr-xr-x | client/vendors/jquery-File-Upload/jquery.fileupload.css | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/client/js/controllers/image/edit.js b/client/js/controllers/image/edit.js index be4eb39..01dbd18 100755 --- a/client/js/controllers/image/edit.js +++ b/client/js/controllers/image/edit.js @@ -25,6 +25,7 @@ mainApp.controller('editImageCtrl', ['$scope', 'Image', 'Loading', 'Identity', ' ); $('#editImageModal').modal('show'); $("#fileupload").fileupload({ + replaceFileInput: false, formData: {task: "image", token: Identity.getToken(), action: "uploadImage", id: $scope.data.id}, /* ... */ progressall: function (e, data) { @@ -36,7 +37,8 @@ mainApp.controller('editImageCtrl', ['$scope', 'Image', 'Loading', 'Identity', ' }, add: function (e, data) { data.process(); - data.context = $('<button/>').text('Upload') + $.each($("#upload_button"), function(){$(this).detach();}); + data.context = $('<button id="upload_button"/>').text('Upload') .click(function () { $(this).detach(); data.submit(); diff --git a/client/partials/image/edit.html b/client/partials/image/edit.html index d5c3621..667e029 100755 --- a/client/partials/image/edit.html +++ b/client/partials/image/edit.html @@ -34,10 +34,12 @@ </fieldset> </form> - <input id="fileupload" type="file" name="files" data-url="../server/index.php"> + <div ng-if='image.status == "queued"'> + <input id="fileupload" type="file" name="files" size="0" data-url="../server/index.php"> <div id="progress"> <div class="bar" style="width: 0%;"></div> </div> + </div> <!-- <form action="../server/index.php" enctype="multipart/form-data" method="post" ng-if='image.status == "queued"'> <input type="hidden" name="task" value="image" /> <input type="hidden" name="token" value="{{ getToken()}}" /> diff --git a/client/vendors/jquery-File-Upload/jquery.fileupload.css b/client/vendors/jquery-File-Upload/jquery.fileupload.css index 8d88011..138e036 100755 --- a/client/vendors/jquery-File-Upload/jquery.fileupload.css +++ b/client/vendors/jquery-File-Upload/jquery.fileupload.css @@ -38,4 +38,10 @@ .bar { height: 18px; background: green; +} + +#progress { + height: 18px; + border: 1px black solid; + width: 100%; }
\ No newline at end of file |
