Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
final 3.3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucej committed Feb 13, 2015
1 parent 3d0a68c commit bacd3bb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
23 changes: 13 additions & 10 deletions js/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,16 @@ var index2 = {
$('#signinform').submit(function() {
$('#signinbutton').click();
return false;
}).find('select').selectmenu()
.data("ui-selectmenu")
._resizeMenu = function() {
this.menu.width(parseInt($('#signinform').find('select').next('span').width()));
if ($('#signinform select').find('option').length > 12)
this.menu.height('300');
};
});
if ($('#signinform').find('select').length === 1) {
$('#signinform').find('select').selectmenu()
.data("ui-selectmenu")
._resizeMenu = function() {
this.menu.width(parseInt($('#signinform').find('select').next('span').width()));
if ($('#signinform select').find('option').length > 12)
this.menu.height('300');
};
}
$('#signupbutton').click(function() {
var $form = $('#signupform'), passwd = $form.find('input[name=pass]').val(),
username = $form.find('input[name=user]').val(), passwd2 = $form.find('input[name=pass2]').val();
Expand Down Expand Up @@ -2041,7 +2044,7 @@ var items = {
if ($('#deletebutton').is(':visible'))
$('#deletebutton').click();
}).bind('keydown', 'q', function() {
$('.backbutton').click();
$('.backbutton').click();
});
}
};
Expand Down Expand Up @@ -3030,7 +3033,7 @@ var displaywindow = {
}).bind('keydown', 'w', function() {
$('.prevrecord').click();
}).bind('keydown', 'q', function() {
$('.backbutton').click();
$('.backbutton').click();
});
}
};
Expand All @@ -3041,7 +3044,7 @@ var filetop = {
gravity: 's'
});
common.init();
$('#file-top-notes').find('p').first().css('margin-top','0');
$('#file-top-notes').find('p').first().css('margin-top', '0');
$('#file-panel2').find('.anotherurl').tipsy({gravity: 's'});
$('#file-panel2').click(function(event) {
var t = event.target;
Expand Down
18 changes: 10 additions & 8 deletions js/pdfviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,16 @@ $('#pdf-viewer-copy-text').change(function() {
//SHOW TEXT CONTAINER
$('.text-container').show().css('cursor', 'default');
//BIND CURSOR TO TEXT LAYER
$('.text-container').mouseenter(function() {
$("#cursor").show();
}).mouseleave(function() {
$("#cursor").hide();
}).mousemove(function(e) {
var posx = 16 + e.pageX, posy = 16 + e.pageY;
$('#cursor').css('top', posy + 'px').css('left', posx + 'px');
});
if ($('#pdf-viewer-marker').prop('checked') === true) {
$('.text-container').mouseenter(function() {
$("#cursor").show();
}).mouseleave(function() {
$("#cursor").hide();
}).mousemove(function(e) {
var posx = 16 + e.pageX, posy = 16 + e.pageY;
$('#cursor').css('top', posy + 'px').css('left', posx + 'px');
});
}
//IF ALREADY POPULATED, EXIT FUNCTION
if (!$('#pdf-viewer-img-div').find('.text-container').is(':empty')) {
clearoverlay();
Expand Down
8 changes: 4 additions & 4 deletions upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function trim_value(&$value) {
$supplement_filename = sprintf("%05d", intval($new_file)) . $_FILES['form_new_file']['name'];
copy($temp_dir . DIRECTORY_SEPARATOR . $_FILES['form_new_file']['name'], $library_path . DIRECTORY_SEPARATOR . 'supplement' . DIRECTORY_SEPARATOR . $supplement_filename);
} else {
$error[] = "Error! No PDF was found. " . $pdf_contents;
$error[] = "Error! No PDF was found.<br>" . $title;
}
}

Expand Down Expand Up @@ -536,11 +536,11 @@ function trim_value(&$value) {

$_POST = array();

if (!empty($error) || !empty($message)) {
if (count($error) > 0 || count($message) > 0) {
$json = array();
if (!empty($error))
if (count($error) > 0)
$json['error'] = $error;
if (!empty($message))
if (count($message) > 0)
$json['message'] = $message;
$json_output = json_encode($json);
die($json_output);
Expand Down

0 comments on commit bacd3bb

Please sign in to comment.