comparison plugins/redmine_checkout/assets/javascripts/checkout.js @ 1117:b4b72f1eb644 redmine-2.2-integration

Moved all the plugins from the vendor folder to the application root folder.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 08 Jan 2013 12:32:05 +0000
parents vendor/plugins/redmine_checkout/assets/javascripts/checkout.js@020926a36823
children
comparison
equal deleted inserted replaced
1116:bb32da3bea34 1117:b4b72f1eb644
1 document.observe("dom:loaded", function() {
2 /* update the checkout URL if clicked on a protocol */
3 $('checkout_protocols').select('a').each(function(e) {
4 e.observe('click', function(event) {
5 $('checkout_url').value = checkout_commands.get(this.id);
6 $('checkout_protocols').select('a').each(function(e) {
7 e.removeClassName("selected");
8 });
9 this.addClassName("selected")
10
11 var value = checkout_access.get(this.id);
12 $('checkout_access').innerHTML = value;
13
14 event.stop();
15 });
16 });
17 /* select the text field contents if activated */
18 Event.observe('checkout_url', 'click', function(event) {
19 this.activate();
20 });
21
22 if (typeof('ZeroClipboard') != 'undefined') {
23 $('clipboard_container').show();
24 clipboard = new ZeroClipboard.Client();
25 clipboard.setHandCursor( true );
26 clipboard.glue('clipboard_button', 'clipboard_container');
27
28 clipboard.addEventListener('mouseOver', function (client) {
29 clipboard.setText( $('checkout_url').value );
30 });
31 }
32 });
33