<div class="page-id hidden">image-browser</div>
- <script language="javascript">
+ <script type="application/javascript">
/* hide all those forms. */
function hideAndShowBlock(blockElement, clickToShowElement, clickToHideElement) {
* @param imageId The ID of the image to edit.
*/
function editImage(imageId) {
- if (editingImageId != imageId) {
+ if (editingImageId !== imageId) {
cancelImageEditing();
} else {
return;
$(".show-data", getImage(imageId)).hide();
$(".edit-data", getImage(imageId)).show();
$(document).bind("click.sone", function(event) {
- if ($(event.target).closest("#image-" + imageId).size() == 0) {
+ if ($(event.target).closest("#image-" + imageId).size() === 0) {
cancelImageEditing();
}
});
sourcePrevSibling = sourceElement.prev();
sourceElement.detach();
destinationElement.before(sourceElement);
- if (sourcePrevSibling.get(0) != destinationElement.get(0)) {
+ if (sourcePrevSibling.get(0) !== destinationElement.get(0)) {
destinationElement.detach();
(sourcePrevSibling.size() > 0) ? sourcePrevSibling.after(destinationElement) : sourceParent.prepend(destinationElement);
}
- if ($("button[name='moveLeft']", sourceElement).hasClass("hidden") != $("button[name='moveLeft']", destinationElement).hasClass("hidden")) {
+ if ($("button[name='moveLeft']", sourceElement).hasClass("hidden") !== $("button[name='moveLeft']", destinationElement).hasClass("hidden")) {
$("button[name='moveLeft']", sourceElement).toggleClass("hidden");
$("button[name='moveLeft']", destinationElement).toggleClass("hidden");
}
- if ($("button[name='moveRight']", sourceElement).hasClass("hidden") != $("button[name='moveRight']", destinationElement).hasClass("hidden")) {
+ if ($("button[name='moveRight']", sourceElement).hasClass("hidden") !== $("button[name='moveRight']", destinationElement).hasClass("hidden")) {
$("button[name='moveRight']", sourceElement).toggleClass("hidden");
$("button[name='moveRight']", destinationElement).toggleClass("hidden");
}
editImage(imageId);
});
$("button[name='moveLeft'], button[name='moveRight']", element).click(function() {
- ajaxGet("editImage.ajax", { "formPassword": getFormPassword(), "image": imageId, "moveLeft": this.name == "moveLeft", "moveRight": this.name == "moveRight" }, function(data) {
+ ajaxGet("editImage.ajax", { "formPassword": getFormPassword(), "image": imageId, "moveLeft": this.name === "moveLeft", "moveRight": this.name === "moveRight" }, function(data) {
if (data && data.success) {
swapImage(data.sourceImageId, data.destinationImageId);
}
* @param albumId The ID of the album to edit.
*/
function editAlbum(albumId) {
- if (editingAlbumId != albumId) {
+ if (editingAlbumId !== albumId) {
if (editingAlbumId != null) {
cancelAlbumEditing();
}
$(".edit-data", getAlbum(albumId)).show();
console.log(getAlbum(albumId));
$(document).bind("click.sone", function(event) {
- if ($(event.target).closest("#album-" + albumId).size() == 0) {
+ if ($(event.target).closest("#album-" + albumId).size() === 0) {
cancelAlbumEditing();
}
});
sourcePrevSibling = sourceElement.prev();
sourceElement.detach();
destinationElement.before(sourceElement);
- if (sourcePrevSibling.get(0) != destinationElement.get(0)) {
+ if (sourcePrevSibling.get(0) !== destinationElement.get(0)) {
destinationElement.detach();
(sourcePrevSibling.size() > 0) ? sourcePrevSibling.after(destinationElement) : sourceParent.prepend(destinationElement);
}
- if ($("button[name='moveLeft']", sourceElement).hasClass("hidden") != $("button[name='moveLeft']", destinationElement).hasClass("hidden")) {
+ if ($("button[name='moveLeft']", sourceElement).hasClass("hidden") !== $("button[name='moveLeft']", destinationElement).hasClass("hidden")) {
$("button[name='moveLeft']", sourceElement).toggleClass("hidden");
$("button[name='moveLeft']", destinationElement).toggleClass("hidden");
}
- if ($("button[name='moveRight']", sourceElement).hasClass("hidden") != $("button[name='moveRight']", destinationElement).hasClass("hidden")) {
+ if ($("button[name='moveRight']", sourceElement).hasClass("hidden") !== $("button[name='moveRight']", destinationElement).hasClass("hidden")) {
$("button[name='moveRight']", sourceElement).toggleClass("hidden");
$("button[name='moveRight']", destinationElement).toggleClass("hidden");
}
editAlbum(albumId);
});
$("button[name='moveLeft'], button[name='moveRight']", element).click(function() {
- ajaxGet("editAlbum.ajax", { "formPassword": getFormPassword(), "album": albumId, "moveLeft": this.name == "moveLeft", "moveRight": this.name == "moveRight" }, function(data) {
+ ajaxGet("editAlbum.ajax", { "formPassword": getFormPassword(), "album": albumId, "moveLeft": this.name === "moveLeft", "moveRight": this.name === "moveRight" }, function(data) {
if (data && data.success) {
swapAlbum(data.sourceAlbumId, data.destinationAlbumId);
}
<%else>
<%if album.sone.local>
- <script language="javascript">
+ <script type="application/javascript">
$(function() {
getTranslation("WebInterface.DefaultText.UploadImage.Title", function(text) {
<%else>
<%if image.sone.local>
- <script language="javascript">
+ <script type="application/javascript">
$(function() {
getTranslation("WebInterface.DefaultText.EditImage.Title", function(text) {
$("#edit-image input[name='title']").each(function() {
<%elseif soneRequested>
<%if sone.local>
- <script language="javascript">
+ <script type="application/javascript">
$(function() {
getTranslation("WebInterface.DefaultText.CreateAlbum.Name", function(text) {
$("#create-album input[name='name']").each(function() {