diff options
| author | 2013-06-09 18:10:22 +0200 | |
|---|---|---|
| committer | 2013-06-09 18:10:23 +0200 | |
| commit | 16af85004c84d0d6c626b4f8424ce9647669a0c1 (patch) | |
| tree | 025d479862d376dbc17e934f4ed20031c8cd97d1 /module/web/app/scripts/views/linkGrabberModal.js | |
| parent | adapted to jshint config (diff) | |
| download | pyload-16af85004c84d0d6c626b4f8424ce9647669a0c1.tar.xz | |
moved everything from module to pyload
Diffstat (limited to 'module/web/app/scripts/views/linkGrabberModal.js')
| -rw-r--r-- | module/web/app/scripts/views/linkGrabberModal.js | 49 | 
1 files changed, 0 insertions, 49 deletions
| diff --git a/module/web/app/scripts/views/linkGrabberModal.js b/module/web/app/scripts/views/linkGrabberModal.js deleted file mode 100644 index e6f59c134..000000000 --- a/module/web/app/scripts/views/linkGrabberModal.js +++ /dev/null @@ -1,49 +0,0 @@ -define(['jquery', 'underscore', 'app', 'views/abstract/modalView', 'hbs!tpl/dialogs/linkgrabber'], -    function($, _, App, modalView, template) { -        'use strict'; -        // Modal dialog for package adding - triggers package:added when package was added -        return modalView.extend({ - -            events: { -                'click .btn-success': 'addPackage', -                'keypress #inputPackageName': 'addOnEnter' -            }, - -            template: template, - -            initialize: function() { -                // Inherit parent events -                this.events = _.extend({}, modalView.prototype.events, this.events); -            }, - -            addOnEnter: function(e) { -                if (e.keyCode !== 13) return; -                this.addPackage(e); -            }, - -            addPackage: function(e) { -                var self = this; -                var options = App.apiRequest('addPackage', -                    { -                        name: $('#inputPackageName').val(), -                        // TODO: better parsing / tokenization -                        links: $('#inputLinks').val().split('\n') -                    }, -                    { -                        success: function() { -                            App.vent.trigger('package:added'); -                            self.hide(); -                        } -                    }); - -                $.ajax(options); -                $('#inputPackageName').val(''); -                $('#inputLinks').val(''); -            }, - -            onShow: function() { -                this.$('#inputPackageName').focus(); -            } - -        }); -    });
\ No newline at end of file | 
