projects
/
Portfolio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a92dc67
)
jslint
author
Benoît Pin
<benoit.pin@gmail.com>
Mon, 7 Apr 2014 08:13:00 +0000
(10:13 +0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Mon, 7 Apr 2014 08:13:00 +0000
(10:13 +0200)
skins/photo_film_viewer.js
patch
|
blob
|
history
diff --git
a/skins/photo_film_viewer.js
b/skins/photo_film_viewer.js
index
bda6428
..
cfd7df5
100644
(file)
--- a/
skins/photo_film_viewer.js
+++ b/
skins/photo_film_viewer.js
@@
-20,7
+20,7
@@
FilmSlider = function(filmBar, slider, ctxInfos, image, toolbar, breadcrumbs) {
var thisSlider = this;
this.filmBar = filmBar;
var film = filmBar.firstChild;
var thisSlider = this;
this.filmBar = filmBar;
var film = filmBar.firstChild;
- if (film.nodeType == 3)
+ if (film.nodeType ==
=
3)
film = film.nextSibling;
this.film = film;
this.slider = slider;
film = film.nextSibling;
this.film = film;
this.slider = slider;
@@
-209,12
+209,12
@@
FilmSlider.prototype.loadSibling = function(previous) {
var slide = null;
if (previous) {
slide = this.selectedSlide.parentNode.previousSibling;
var slide = null;
if (previous) {
slide = this.selectedSlide.parentNode.previousSibling;
- if (slide && slide.nodeType==3)
+ if (slide && slide.nodeType==
=
3)
slide = slide.previousSibling;
}
else {
slide = this.selectedSlide.parentNode.nextSibling;
slide = slide.previousSibling;
}
else {
slide = this.selectedSlide.parentNode.nextSibling;
- if (slide && slide.nodeType==3)
+ if (slide && slide.nodeType==
=
3)
slide = slide.nextSibling;
}
slide = slide.nextSibling;
}
@@
-303,7
+303,7
@@
FilmSlider.prototype.thumbnailClickHandler = function(evt) {
if (target.tagName != 'A')
return;
else {
if (target.tagName != 'A')
return;
else {
- if (this.viewMode == 'full') {
+ if (this.viewMode ==
=
'full') {
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
@@
-335,7
+335,7
@@
FilmSlider.prototype.thumbnailClickHandler = function(evt) {
var toggleSelectionBtn = this.buttons['toggle_selection'];
var toggleSelectionLink = toggleSelectionBtn.parentNode;
var toggleSelectionBtn = this.buttons['toggle_selection'];
var toggleSelectionLink = toggleSelectionBtn.parentNode;
- this.selectedSlideInSelection = (target.className=='selected');
+ this.selectedSlideInSelection = (target.className==
=
'selected');
if (this.selectedSlideInSelection) {
toggleSelectionBtn.src = portal_url() + '/unselect_flag_btn.gif';
toggleSelectionBtn.alt = toggleSelectionLink.title = 'Retirer de la sélection';
if (this.selectedSlideInSelection) {
toggleSelectionBtn.src = portal_url() + '/unselect_flag_btn.gif';
toggleSelectionBtn.alt = toggleSelectionLink.title = 'Retirer de la sélection';
@@
-379,7
+379,7
@@
FilmSlider.prototype.thumbnailClickHandler = function(evt) {
break;
case 4 :
hideProgressImage();
break;
case 4 :
hideProgressImage();
- if (req.status == '200')
+ if (req.status ==
=
'200')
thisFS.populateViewer(req);
else
//window.location.href = target.href;
thisFS.populateViewer(req);
else
//window.location.href = target.href;
@@
-399,7
+399,7
@@
FilmSlider.prototype.thumbnailClickHandler = function(evt) {
for (i in classes) {
name = classes[i];
for (i in classes) {
name = classes[i];
- if (name == 'displayed')
+ if (name ==
=
'displayed')
continue;
else
newClasses.push(name);
continue;
else
newClasses.push(name);
@@
-418,7
+418,7
@@
FilmSlider.prototype.thumbnailClickHandler = function(evt) {
FilmSlider.prototype.toolbarClickHandler = function(evt) {
var target = getTargetedObject(evt);
FilmSlider.prototype.toolbarClickHandler = function(evt) {
var target = getTargetedObject(evt);
- if(target.tagName == 'IMG' && target.getAttribute('name')){
+ if(target.tagName ==
=
'IMG' && target.getAttribute('name')){
switch(target.getAttribute('name')) {
case 'previous' :
disableDefault(evt);
switch(target.getAttribute('name')) {
case 'previous' :
disableDefault(evt);
@@
-440,7
+440,7
@@
FilmSlider.prototype.toolbarClickHandler = function(evt) {
disableDefault(evt);
disablePropagation(evt);
target.parentNode.blur();
disableDefault(evt);
disablePropagation(evt);
target.parentNode.blur();
- if (this.viewMode == 'full') {
+ if (this.viewMode ==
=
'full') {
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
@@
-516,7
+516,7
@@
FilmSlider.prototype.toolbarClickHandler = function(evt) {
disableDefault(evt);
disablePropagation(evt);
target.blur();
disableDefault(evt);
disablePropagation(evt);
target.blur();
- if (this.viewMode == 'full') {
+ if (this.viewMode ==
=
'full') {
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
this.mosaique.unload();
this.mosaique = null;
this.viewMode = 'medium';
@@
-576,7
+576,7
@@
FilmSlider.prototype.keyDownHandler = function(evt) {
FilmSlider.prototype.keyPressHandler = function(evt) {
var target = getTargetedObject(evt);
FilmSlider.prototype.keyPressHandler = function(evt) {
var target = getTargetedObject(evt);
- if (target.tagName ==
'INPUT' || target.tagName
== 'TEXTAREA')
+ if (target.tagName ==
= 'INPUT' || target.tagName=
== 'TEXTAREA')
return;
var evt = getEventObject(evt);
var charPress = String.fromCharCode((evt.keyCode) ? evt.keyCode : evt.which);
return;
var evt = getEventObject(evt);
var charPress = String.fromCharCode((evt.keyCode) ? evt.keyCode : evt.which);
@@
-602,9
+602,9
@@
FilmSlider.prototype.populateViewer = function(req) {
link.href = element.getAttribute('backToContextUrl');
link = this.buttons['show_buyable'].parentNode;
var buyable = element.getAttribute('buyable');
link.href = element.getAttribute('backToContextUrl');
link = this.buttons['show_buyable'].parentNode;
var buyable = element.getAttribute('buyable');
- if(buyable == 'True')
+ if(buyable ==
=
'True')
link.className = null;
link.className = null;
- else if(buyable == 'False')
+ else if(buyable ==
=
'False')
link.className = 'hidden';
this.image.alt = element.getAttribute('alt');
this.updateBreadcrumbs(element.getAttribute('lastBcUrl'),
link.className = 'hidden';
this.image.alt = element.getAttribute('alt');
this.updateBreadcrumbs(element.getAttribute('lastBcUrl'),
@@
-640,7
+640,7
@@
FilmSlider.prototype.startSlideShow = function() {
FilmSlider.prototype.slideShowNext = function() {
var nextSlide = this.slideShowSlide.parentNode.nextSibling;
FilmSlider.prototype.slideShowNext = function() {
var nextSlide = this.slideShowSlide.parentNode.nextSibling;
- if (nextSlide && nextSlide.nodeType==3)
+ if (nextSlide && nextSlide.nodeType==
=
3)
nextSlide = nextSlide.nextSibling;
if (nextSlide) {
nextSlide = nextSlide.nextSibling;
if (nextSlide) {
@@
-651,7
+651,7
@@
FilmSlider.prototype.slideShowNext = function() {
else {
var row = this.slideShowSlide.parentNode.parentNode;
var first = row.firstChild;
else {
var row = this.slideShowSlide.parentNode.parentNode;
var first = row.firstChild;
- if (first.nodeType==3)
+ if (first.nodeType==
=
3)
first = first.nextSibling;
this.pendingSlideShowSlide = first.getElementsByTagName('a')[0];
return this.pendingSlideShowSlide.href;
first = first.nextSibling;
this.pendingSlideShowSlide = first.getElementsByTagName('a')[0];
return this.pendingSlideShowSlide.href;
@@
-660,7
+660,7
@@
FilmSlider.prototype.slideShowNext = function() {
FilmSlider.prototype.slideShowPrevious = function() {
var previousSlide = this.slideShowSlide.parentNode.previousSibling;
FilmSlider.prototype.slideShowPrevious = function() {
var previousSlide = this.slideShowSlide.parentNode.previousSibling;
- if (previousSlide && previousSlide.nodeType==3)
+ if (previousSlide && previousSlide.nodeType==
=
3)
previousSlide = previousSlide.previousSibling;
if (previousSlide) {
previousSlide = previousSlide.previousSibling;
if (previousSlide) {
@@
-671,7
+671,7
@@
FilmSlider.prototype.slideShowPrevious = function() {
else {
var row = this.slideShowSlide.parentNode.parentNode;
var last = row.lastChild;
else {
var row = this.slideShowSlide.parentNode.parentNode;
var last = row.lastChild;
- if (last.nodeType==3)
+ if (last.nodeType==
=
3)
last = last.previousSibling;
this.pendingSlideShowSlide = last.getElementsByTagName('a')[0];
return this.pendingSlideShowSlide.href;
last = last.previousSibling;
this.pendingSlideShowSlide = last.getElementsByTagName('a')[0];
return this.pendingSlideShowSlide.href;