Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
fix(js): fix variables and dependencies in AMD module
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed Aug 23, 2016
1 parent 746437c commit 3b777a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions views/default/forms/attachments/upload.js
@@ -1,7 +1,9 @@
define(function (require) {

var elgg = require('elgg');
var $ = require('jquery');
require('jquery.form');
var lightbox = require('elgg/lightbox');

$(document).on('submit', '#colorbox .elgg-form-attachments-upload', function (e) {
e.preventDefault();
Expand All @@ -10,7 +12,7 @@ define(function (require) {
$form.ajaxSubmit({
dataType: 'json',
iframe: true,
data: {
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
beforeSend: function () {
Expand All @@ -21,7 +23,7 @@ define(function (require) {
},
success: function (data) {
if (data.status >= 0) {
$.colorbox.close();
lightbox.close();
}
if (data.system_messages) {
elgg.register_error(data.system_messages.error);
Expand Down

0 comments on commit 3b777a3

Please sign in to comment.