aboutsummaryrefslogtreecommitdiff
path: root/static/js/wpaint/bai.js
blob: 6b436c1e984320a5905b0ea22772f8a4b502f960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function saveImg(image) {
  var _this = this;
  var url = document.getElementById('finish').href;
  
  $.ajax({
    type: 'POST',
    url: '/oek_temp/upload.php',
    data: {image: image},
    success: function (resp) {
      _this._displayStatus('Image saved successfully');
      window.location.href = url;
    }
  });
}

$('#wPaint').wPaint({
  path: '/static/js/wpaint/',
  bg: '#ffffff',
  menuOffsetLeft: -35,
  menuOffsetTop: -50,
  menuOrientation: 'horizontal',
  saveImg: saveImg
});