Added generic copyToClipboard().
This commit is contained in:
parent
6d65d96276
commit
81aa39e7ac
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,12 @@ class App.Controller extends Spine.Controller
|
||||||
# $('html head title').html( @Config.get(product_name) + ' - ' + App.i18n.translateInline(name) )
|
# $('html head title').html( @Config.get(product_name) + ' - ' + App.i18n.translateInline(name) )
|
||||||
document.title = @Config.get('product_name') + ' - ' + App.i18n.translatePlain(name)
|
document.title = @Config.get('product_name') + ' - ' + App.i18n.translatePlain(name)
|
||||||
|
|
||||||
|
copyToClipboard: (text) ->
|
||||||
|
if window.clipboardData # IE
|
||||||
|
window.clipboardData.setData( 'Text', text )
|
||||||
|
else
|
||||||
|
window.prompt( "Copy to clipboard: Ctrl+C, Enter", text )
|
||||||
|
|
||||||
# add @notify methode to create notification
|
# add @notify methode to create notification
|
||||||
notify: (data) ->
|
notify: (data) ->
|
||||||
App.Event.trigger 'notify', data
|
App.Event.trigger 'notify', data
|
||||||
|
|
Loading…
Reference in a new issue