Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Conditional to check between `files` and `items` in array for file upload between chrome and safari
- alias in provider model to check if has highlighted subjects
- `preprintDoiCreated` attribute to the `preprint` model
- `ember-cli-clipboard` to allow copying to clipboard on more browsers

### Changed
- getContents() function for files to use `redirect = true` and `mode = 'render'`
Expand Down
4 changes: 0 additions & 4 deletions addon/components/file-version/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,5 @@ export default Ember.Component.extend({
changeVersion(version) {
this.attrs.versionChange(version);
},
copyLink(id) {
Ember.$('#'+id).select();
document.execCommand('copy');
}
}
});
16 changes: 14 additions & 2 deletions addon/components/file-version/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,27 @@
<td class='hidden-md hidden-sm hidden-xs'>
<div class='input-group'>
<span class='input-group-btn'>
<button type='button' class='btn btn-default btn-sm' onclick={{action 'copyLink' (concat 'md5-' version.id)}}>{{fa-icon 'copy'}}</button>
{{#copy-button
clipboardTarget=(concat '#md5-' version.id)
title="Copy to clipboard"
class="btn btn-default btn-sm"
}}
{{fa-icon 'copy'}}
{{/copy-button}}
</span>
<input type='text' readonly='readonly' value='{{version.attributes.extra.hashes.md5}}' class='hashBox' id='md5-{{version.id}}'>
</div>
</td>
<td class='hidden-md hidden-sm hidden-xs'>
<div class='input-group'>
<span class='input-group-btn'>
<button type='button' class='btn btn-default btn-sm' onclick={{action 'copyLink' (concat 'sha256-' version.id)}}>{{fa-icon 'copy'}}</button>
{{#copy-button
clipboardTarget=(concat '#sha256-' version.id)
title='Copy to clipboard'
class="btn btn-default btn-sm"
}}
{{fa-icon 'copy'}}
{{/copy-button}}
</span>
<input type='text' readonly='readonly' value='{{version.attributes.extra.hashes.sha256}}' class='hashBox' id='sha256-{{version.id}}'>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"ember-cli": "2.11.1",
"ember-cli-app-version": "2.0.2",
"ember-cli-bootstrap-sassy": "^0.5.6",
"ember-cli-clipboard": "^0.8.0",
"ember-cli-code-coverage": "0.3.11",
"ember-cli-dependency-checker": "1.3.0",
"ember-cli-eslint": "^3.1.0",
Expand Down Expand Up @@ -86,6 +85,7 @@
"ember-ace": "^1.2.0",
"ember-bootstrap-datepicker": "^2.0.3",
"ember-cli-babel": "6.4.1",
"ember-cli-clipboard": "0.8.1",
"ember-cli-htmlbars": "2.0.1",
"ember-cli-htmlbars-inline-precompile": "0.4.3",
"ember-cli-moment-shim": "^3.3.1",
Expand Down
32 changes: 28 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,12 @@ babel-plugin-ember-modules-api-polyfill@^2.0.1:
dependencies:
ember-rfc176-data "^0.3.0"

babel-plugin-ember-modules-api-polyfill@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.3.0.tgz#0c01f359658cfb9c797f705af6b09f6220205ae0"
dependencies:
ember-rfc176-data "^0.3.0"

babel-plugin-eval@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz#a2faed25ce6be69ade4bfec263f70169195950da"
Expand Down Expand Up @@ -2899,6 +2905,24 @@ ember-cli-babel@^6.0.0, ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-be
clone "^2.0.0"
ember-cli-version-checker "^2.0.0"

ember-cli-babel@^6.8.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.11.0.tgz#79cb184bac3c05bfe181ddc306bac100ab1f9493"
dependencies:
amd-name-resolver "0.0.7"
babel-plugin-debug-macros "^0.1.11"
babel-plugin-ember-modules-api-polyfill "^2.3.0"
babel-plugin-transform-es2015-modules-amd "^6.24.0"
babel-polyfill "^6.16.0"
babel-preset-env "^1.5.1"
broccoli-babel-transpiler "^6.1.2"
broccoli-debug "^0.6.2"
broccoli-funnel "^1.0.0"
broccoli-source "^1.1.0"
clone "^2.0.0"
ember-cli-version-checker "^2.1.0"
semver "^5.4.1"

ember-cli-babel@^6.9.2:
version "6.10.0"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-6.10.0.tgz#81424acd1d97fb13658168121eeb2007d6edee84"
Expand Down Expand Up @@ -2936,13 +2960,13 @@ ember-cli-broccoli-sane-watcher@^2.0.3:
rsvp "^3.0.18"
sane "^1.1.1"

ember-cli-clipboard@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/ember-cli-clipboard/-/ember-cli-clipboard-0.8.0.tgz#c2e91290b2746c1a4903097f5d7a55406de539b1"
ember-cli-clipboard@0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/ember-cli-clipboard/-/ember-cli-clipboard-0.8.1.tgz#59f8eb6ba471a7668dff592fcebb7b06014240dd"
dependencies:
broccoli-funnel "^1.1.0"
clipboard "^1.7.1"
ember-cli-babel "^6.3.0"
ember-cli-babel "^6.8.0"
ember-cli-htmlbars "^2.0.2"
fastboot-transform "0.1.1"

Expand Down