Skip to content
Snippets Groups Projects
Commit 361ceebf authored by Alec Smecher's avatar Alec Smecher
Browse files

JSLint corrections

parent cc2de9ad
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,9 @@
}
var uploaderOptions,
pluploaderId,
$browseButton,
self;
pluploaderId,
$browseButton,
self;
// Set up options to pass to plupload
uploaderOptions = {
......@@ -102,14 +102,14 @@
// Fake a focus effect on the visual button when plupload's hidden
// button is focused
self = this;
setTimeout( function() {
setTimeout(function() {
self.getHtmlElement().find('.moxie-shim input')
.focus(function(e) {
$browseButton.addClass('in_focus');
})
$browseButton.addClass('in_focus');
})
.blur(function(e) {
$browseButton.removeClass('in_focus');
});
$browseButton.removeClass('in_focus');
});
}, 100);
};
$.pkp.classes.Helper.inherits(
......
......@@ -52,25 +52,28 @@
}
// Handle datepicker
// If we find a .datepicker in tpl the code adds (form/textInput.tpl) a new hidden field with the
// id = <original-element-id>-altField
// attr: data-date-format = date format from config.inc.php translated into JQuery Datepicker date format
// The <original-element-name> if changed to <original-element-name>-removed in order for the hidden field value to send to post request
// altField and altFormat are used in order for the user to have its config.inc.php dateFormatShort parameter displayed
// but 'yy-mm-dd' to be send to post request. [http://api.jqueryui.com/datepicker/#option-altField]
$('.datepicker').each(function () {
// If we find a .datepicker in tpl the code adds (form/textInput.tpl) a new
// hidden field with the id = <original-element-id>-altField attr:
// data-date-format = date format from config.inc.php translated into JQuery
// Datepicker date format. The <original-element-name> if changed to
// <original-element-name>-removed in order for the hidden field value to
// send to post request altField and altFormat are used in order for the user
// to have its config.inc.php dateFormatShort parameter displayed but
// 'yy-mm-dd' to be send to post request.
// [http://api.jqueryui.com/datepicker/#option-altField]
$('.datepicker').each(function() {
$(this).datepicker({
altField: '#' + $(this).prop('id') + '-altField',
altFormat: 'yy-mm-dd',
dateFormat: $('#' + $(this).prop('id') + '-altField').attr('data-date-format')
dateFormat: $('#' + $(this).prop('id') + '-altField')
.attr('data-date-format')
});
if (!$(this).hasClass('hasDatepicker')) {
$(this).prop('name', $(this).prop('name') + "-removed");
$(this).prop('name', $(this).prop('name') + '-removed');
}
});
// Set the redirect-to URL for the cancel button (if there is one).
if (options.cancelRedirectUrl) {
......
......@@ -144,6 +144,7 @@
}
};
/**
* Check if the field is missing a localization
*
......@@ -156,14 +157,14 @@
function() {
var $popover = this.getHtmlElement(),
$inputs = [],
valuesCount = 0;
$inputs = [],
valuesCount = 0;
// Track current values in the tinyMCE control
if (this.getHtmlElement().find('.richContent').length) {
$popover.find('textarea').each(function() {
var id = $(this).attr('id'),
tinymce;
tinymce;
$inputs.push($(this));
tinymce = tinyMCE.EditorManager.get(/** @type {string} */(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment