From b5ab6830421b7147eac005470f50d0cb44080daf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Sun, 31 Aug 2014 20:29:38 +0200 Subject: [PATCH 01/16] =?utf8?q?Callback=20ajax=20apr=C3=A8s=20d=C3=A9plac?= =?utf8?q?ement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_lightbox_viewer.js | 50 ++++++++++++++++++++++++++++------ skins/portfolio_move_photos.py | 17 ++++++++++++ 2 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 skins/portfolio_move_photos.py diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index cffa157..f4c4498 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -490,25 +490,59 @@ Lightbox.prototype.onDragOver = function(evt) { if (target !== this.dragged) { target.classList.add('dragover'); } - if (this.previousDragOver && this.previousDragOver !== target) { - this.previousDragOver.classList.remove('dragover'); + if (this.lastDropTarget && this.lastDropTarget !== target) { + this.lastDropTarget.classList.remove('dragover'); } - this.previousDragOver = target; + this.lastDropTarget = target; }; Lightbox.prototype.onDragEnd = function(evt) { - if (this.previousDragOver) { - this.previousDragOver.classList.remove('dragover'); + if (this.lastDropTarget) { + this.lastDropTarget.classList.remove('dragover'); var i, slide; for(i=this.draggedSelection.length -1 ; i>=0 ; i--) { - console.log(i); slide = this.draggedSelection[i].cloneNode(true); - this.grid.insertBefore(slide, this.previousDragOver.nextSibling); + this.grid.insertBefore(slide, this.lastDropTarget.nextSibling); slide.style.opacity = 1; slide.style.width = ''; } + this.moveSelectedPhotos(); } - this.draggedSelection = this.previousDragOver = this.dragged = undefined; + // this.draggedSelection = this.lastDropTarget + this.dragged = undefined; +}; + +Lightbox.prototype.moveSelectedPhotos = function() { + var req = new XMLHttpRequest(); + self = this; + req.onreadystatechange = function() { + switch (req.readyState) { + case 1 : + showProgressImage(); + break; + case 4 : + hideProgressImage(); + if (req.status === 200) { + console.log(req.responseText); + // self._refreshGrid(req); + } + break; + } + }; + + var url = absolute_url() + '/portfolio_move_photos'; + req.open("POST", url, true); + req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); + var query = 'container_type=' + this.container_type; + var i; + for (i=0 ; i Date: Sun, 31 Aug 2014 21:44:36 +0200 Subject: [PATCH 02/16] =?utf8?q?Traitement=20de=20la=20r=C3=A9ponse=20http?= =?utf8?q?=20lors=20d'un=20tri.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_lightbox_viewer.js | 33 ++++++++++++++++++++++++++++----- skins/portfolio_move_photos.py | 7 ++++++- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index f4c4498..3c69aec 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -500,8 +500,10 @@ Lightbox.prototype.onDragEnd = function(evt) { if (this.lastDropTarget) { this.lastDropTarget.classList.remove('dragover'); var i, slide; + this.pendingMovedSlides = []; for(i=this.draggedSelection.length -1 ; i>=0 ; i--) { slide = this.draggedSelection[i].cloneNode(true); + this.pendingMovedSlides.push(slide); this.grid.insertBefore(slide, this.lastDropTarget.nextSibling); slide.style.opacity = 1; slide.style.width = ''; @@ -522,10 +524,7 @@ Lightbox.prototype.moveSelectedPhotos = function() { break; case 4 : hideProgressImage(); - if (req.status === 200) { - console.log(req.responseText); - // self._refreshGrid(req); - } + self._moveSelectedPhotos(req) break; } }; @@ -542,7 +541,31 @@ Lightbox.prototype.moveSelectedPhotos = function() { req.send(query); }; -Lightbox.prototype.moveSelectedPhoto = function() { +Lightbox.prototype._moveSelectedPhotos = function(req) { + var i, slide; + if (req.status === 200) { + var doc = req.responseXML.documentElement; + if (doc.nodeName === 'ok') { + this.pendingMovedSlides = undefined; + for(i=0 ; i' + except NotImplementedError : + raise return printed -- 2.20.1 From 42f8aecd3f2b63a3929bb3a0baf420c6bd47b05f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Thu, 4 Sep 2014 22:51:23 +0200 Subject: [PATCH 03/16] =?utf8?q?Introduction=20d'un=20syst=C3=A8me=20de=20?= =?utf8?q?remise=20scriptable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/my_cart.py | 184 ++++++++++++++++++++------------------ skins/my_cart_template.pt | 5 ++ 2 files changed, 100 insertions(+), 89 deletions(-) diff --git a/skins/my_cart.py b/skins/my_cart.py index f305a1e..e12acec 100755 --- a/skins/my_cart.py +++ b/skins/my_cart.py @@ -22,127 +22,133 @@ form = context.REQUEST.form nextStep = None if cart.locked : - pendingOrder = context.restrictedTraverse(cart.pendingOrderPath) - return context.setRedirect(pendingOrder, 'object/view', ajax=form.get('ajax')) + pendingOrder = context.restrictedTraverse(cart.pendingOrderPath) + return context.setRedirect(pendingOrder, 'object/view', ajax=form.get('ajax')) if order : - if isAnon : - atool = portal.portal_actions - came_from = '%s/my_cart' % portal_url - return context.setRedirect(atool, 'customer/login', came_from=came_from, ajax=form.get('ajax')) + if isAnon : + atool = portal.portal_actions + came_from = '%s/my_cart' % portal_url + return context.setRedirect(atool, 'customer/login', came_from=came_from, ajax=form.get('ajax')) if shipping : - member = mtool.getAuthenticatedMember() - options['shipping_fullname'] = member.getMemberFullName(nameBefore=0) - options['shipping_address'] = member.getProperty('billing_address') - options['shipping_city'] = member.getProperty('billing_city') - options['shipping_zipcode'] = member.getProperty('billing_zipcode') - options['shipping_country'] = member.getProperty('country') - return context.shipping_template(**options) + member = mtool.getAuthenticatedMember() + options['shipping_fullname'] = member.getMemberFullName(nameBefore=0) + options['shipping_address'] = member.getProperty('billing_address') + options['shipping_city'] = member.getProperty('billing_city') + options['shipping_zipcode'] = member.getProperty('billing_zipcode') + options['shipping_country'] = member.getProperty('country') + return context.shipping_template(**options) if set_shipping : - fg = lambda name : form.get(name,'').strip() - if context.shipping_set_control(**form) : - order = pptool.addPrintOrder(cart) - return context.setRedirect(order, 'object/view', ajax=fg('ajax')) - else : - for name in [ 'shipping_fullname' - , 'shipping_address' - , 'shipping_city' - , 'shipping_zipcode' - , 'shipping_country'] : - options[name] = fg(name) - return context.shipping_template(**options) + fg = lambda name : form.get(name,'').strip() + if context.shipping_set_control(**form) : + order = pptool.addPrintOrder(cart) + return context.setRedirect(order, 'object/view', ajax=fg('ajax')) + else : + for name in [ 'shipping_fullname' + , 'shipping_address' + , 'shipping_city' + , 'shipping_zipcode' + , 'shipping_country'] : + options[name] = fg(name) + return context.shipping_template(**options) if isAnon : - nextStep = {'name':'order', 'value' : _('Order >>')} + nextStep = {'name':'order', 'value' : _('Order >>')} else : - nextStep = {'name':'shipping', 'value' : _('Shipping >>')} - + nextStep = {'name':'shipping', 'value' : _('Shipping >>')} + msg = '' for k, v in form.items() : - if hasattr(v, 'items') : - uid, templateId = k.split('_',1) - if v.has_key('refresh') : - quantity = v['quantity'] - try : - quantity = int(quantity) - except ValueError: - msg = _('You must enter an integer for quantity (found: %s)') % quantity - if quantity <= 0 : - msg = _('You must enter a positive value for quantity (found: %s)') % quantity - if not msg : - item = {'cmf_uid' : uid - ,'printing_template' : templateId - ,'quantity' : quantity} - try : - cart.update(context, item) - except SoldOutError, e : - n = e.n - if n > 1 : - msg = _("Only %d available copies of this photo in this size.") % n - elif n == 1 : - msg = _("Only one last available copy of this photo in this size.") - else : - msg = _("No more available copy of this photo and in this size.") - - - if v.has_key('delete'): - cart.remove(context, uid, templateId) + if hasattr(v, 'items') : + uid, templateId = k.split('_',1) + if v.has_key('refresh') : + quantity = v['quantity'] + try : + quantity = int(quantity) + except ValueError: + msg = _('You must enter an integer for quantity (found: %s)') % quantity + if quantity <= 0 : + msg = _('You must enter a positive value for quantity (found: %s)') % quantity + if not msg : + item = {'cmf_uid' : uid + ,'printing_template' : templateId + ,'quantity' : quantity} + try : + cart.update(context, item) + except SoldOutError, e : + n = e.n + if n > 1 : + msg = _("Only %d available copies of this photo in this size.") % n + elif n == 1 : + msg = _("Only one last available copy of this photo in this size.") + else : + msg = _("No more available copy of this photo and in this size.") + + + if v.has_key('delete'): + cart.remove(context, uid, templateId) options['empty'] = not cart infos = [] prices = [] quantityTotal = 0 for item in cart : - b = uidh.getBrain(item['cmf_uid']) - poptions = pptool.getPrintingOptionsContainerFor(b.getObject()) - pt = getattr(poptions, item['printing_template']) - size = b.getThumbnailSize - d = {'thumbUrl' : '%s/getThumbnail' % b.getURL() - ,'thumbHeight' : size['height'] / 2 - ,'thumbWidth' : size['width'] / 2 - ,'alt' : ('%s - %s' % (b.Title, b.Description)).strip(' -') - ,'cmf_uid':b.cmf_uid - ,'title': pt.title - ,'description': pt.description - ,'quantity':item['quantity'] - ,'amount': '%s €' % (pt.price * item['quantity']).taxed - ,'templateId': pt.getId() - } - quantityTotal += item['quantity'] - prices.append(pt.price * item['quantity']) - infos.append(d) + b = uidh.getBrain(item['cmf_uid']) + poptions = pptool.getPrintingOptionsContainerFor(b.getObject()) + pt = getattr(poptions, item['printing_template']) + size = b.getThumbnailSize + d = {'thumbUrl' : '%s/getThumbnail' % b.getURL() + ,'thumbHeight' : size['height'] / 2 + ,'thumbWidth' : size['width'] / 2 + ,'alt' : ('%s - %s' % (b.Title, b.Description)).strip(' -') + ,'cmf_uid':b.cmf_uid + ,'title': pt.title + ,'description': pt.description + ,'quantity':item['quantity'] + ,'amount': '%s €' % (pt.price * item['quantity']).taxed + ,'templateId': pt.getId() + } + quantityTotal += item['quantity'] + prices.append(pt.price * item['quantity']) + infos.append(d) options['infos'] = infos if len(prices) == 1: - pricesTotal = prices[0] + pricesTotal = prices[0] elif len(prices) > 1 : - pricesTotal = reduce(lambda a, b : a + b, prices) + pricesTotal = reduce(lambda a, b : a + b, prices) + if prices : - options['pricesTotal'] = pricesTotal - options['quantityTotal'] = quantityTotal - shippingFees = pptool.getShippingFeesFor(price=pricesTotal) - options['shippingFees'] = shippingFees - options['totalAmount'] = pricesTotal + shippingFees + options['pricesTotal'] = pricesTotal + options['quantityTotal'] = quantityTotal + discount = 0 + if context.get('photoprint_discount') : + discount = context.photoprint_discount(pricesTotal, quantityTotal) + options['discount'] = discount + shippingFees = pptool.getShippingFeesFor(price=pricesTotal) + options['shippingFees'] = shippingFees + coeff = (100 - discount) / 100. + options['totalAmount'] = pricesTotal * coeff + shippingFees breadcrumbs = [ - { 'id' : 'root' - , 'title' : portal.title - , 'url' : portal_url}, + { 'id' : 'root' + , 'title' : portal.title + , 'url' : portal_url}, - {'id' : 'my_cart' - ,'title' : _('My cart') - , 'url' : '%s/my_cart' % portal_url} - ] + {'id' : 'my_cart' + ,'title' : _('My cart') + , 'url' : '%s/my_cart' % portal_url} + ] options['breadcrumbs'] = breadcrumbs if msg : - context.REQUEST.other['portal_status_message'] = msg + context.REQUEST.other['portal_status_message'] = msg options['cartIsOrder'] = False options['nextStep'] = nextStep return context.my_cart_template(**options) diff --git a/skins/my_cart_template.pt b/skins/my_cart_template.pt index b05a499..bdafd8c 100644 --- a/skins/my_cart_template.pt +++ b/skins/my_cart_template.pt @@ -76,6 +76,11 @@ prices total
+ + Discount + % +
+ Shipping 2 -- 2.20.1 From 01d91dfe8e676a59d83166eba69a55cff7796bd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Thu, 4 Sep 2014 23:28:18 +0200 Subject: [PATCH 04/16] maniaquerie --- skins/my_cart_template.pt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skins/my_cart_template.pt b/skins/my_cart_template.pt index bdafd8c..3fe3747 100644 --- a/skins/my_cart_template.pt +++ b/skins/my_cart_template.pt @@ -78,7 +78,7 @@ Discount - % +  %
-- 2.20.1 From f7e548f8e74520f1ff8b9ad72ff40ed0d4126773 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 5 Sep 2014 00:24:56 +0200 Subject: [PATCH 05/16] localisation++ --- locales/en/LC_MESSAGES/portfolio.po | 20 ++++++++++++-------- locales/fr/LC_MESSAGES/portfolio.mo | Bin 7387 -> 7419 bytes locales/fr/LC_MESSAGES/portfolio.po | 24 ++++++++++++++---------- locales/portfolio.pot | 22 +++++++++++++--------- 4 files changed, 39 insertions(+), 27 deletions(-) diff --git a/locales/en/LC_MESSAGES/portfolio.po b/locales/en/LC_MESSAGES/portfolio.po index 09f46f3..e6d88cf 100644 --- a/locales/en/LC_MESSAGES/portfolio.po +++ b/locales/en/LC_MESSAGES/portfolio.po @@ -74,15 +74,15 @@ msgstr "" msgid "Lightbox created." msgstr "" -#: o/skins/lightbox_view.py:53 +#: o/skins/lightbox_view.py:51 msgid "Photo removed." msgstr "" -#: o/skins/lightbox_view.py:55 +#: o/skins/lightbox_view.py:53 msgid "Removed photos." msgstr "" -#: o/skins/lightbox_view.py:57 +#: o/skins/lightbox_view.py:55 msgid "Nothing to remove." msgstr "" @@ -116,7 +116,7 @@ msgstr "" msgid "No more available copy of this photo and in this size." msgstr "" -#: o/skins/my_cart.py:138 o/skins/my_cart_template.pt:113 +#: o/skins/my_cart.py:144 o/skins/my_cart_template.pt:118 msgid "My cart" msgstr "" @@ -148,19 +148,23 @@ msgstr "" msgid "Total" msgstr "" -#: o/skins/my_cart_template.pt:80 o/skins/sell_macros.pt:16 +#: o/skins/my_cart_template.pt:80 +msgid "Discount" +msgstr "" + +#: o/skins/my_cart_template.pt:85 o/skins/sell_macros.pt:16 msgid "Shipping" msgstr "" -#: o/skins/my_cart_template.pt:85 +#: o/skins/my_cart_template.pt:90 msgid "VAT" msgstr "" -#: o/skins/my_cart_template.pt:90 +#: o/skins/my_cart_template.pt:95 msgid "Total amount to pay" msgstr "" -#: o/skins/my_cart_template.pt:114 +#: o/skins/my_cart_template.pt:119 msgid "Your cart is currently empty." msgstr "" diff --git a/locales/fr/LC_MESSAGES/portfolio.mo b/locales/fr/LC_MESSAGES/portfolio.mo index 400e2cc169966841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NKDN;8{Jbw7^(lgJ7Zlsh>3*XKqxxU)7{z8zh!DuTK}18A5G3^*uSf=qPDQSvaY(i cuCltfBWvEY6{WGIrvGTx^$Gni=N?Y~ADULk-v9sr diff --git a/locales/fr/LC_MESSAGES/portfolio.po b/locales/fr/LC_MESSAGES/portfolio.po index 00a754f..edfe697 100644 --- a/locales/fr/LC_MESSAGES/portfolio.po +++ b/locales/fr/LC_MESSAGES/portfolio.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Fri Aug 29 13:55:35 2014\n" -"PO-Revision-Date: 2014-08-29 13:56+0200\n" +"POT-Creation-Date: Fri Sep 5 00:23:02 2014\n" +"PO-Revision-Date: 2014-09-05 00:24+0200\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" "Language: \n" @@ -97,15 +97,15 @@ msgstr "Vous devez entrer un titre." msgid "Lightbox created." msgstr "Table lumineuse créée." -#: o/skins/lightbox_view.py:53 +#: o/skins/lightbox_view.py:51 msgid "Photo removed." msgstr "Photo retirée." -#: o/skins/lightbox_view.py:55 +#: o/skins/lightbox_view.py:53 msgid "Removed photos." msgstr "Photos retirées." -#: o/skins/lightbox_view.py:57 +#: o/skins/lightbox_view.py:55 msgid "Nothing to remove." msgstr "Rien à retirer." @@ -141,7 +141,7 @@ msgstr "Livraison >>" msgid "No more available copy of this photo and in this size." msgstr "Plus aucun tirage disponible pour cette photo à ce format." -#: o/skins/my_cart.py:138 o/skins/my_cart_template.pt:113 +#: o/skins/my_cart.py:144 o/skins/my_cart_template.pt:118 msgid "My cart" msgstr "Mon panier" @@ -173,19 +173,23 @@ msgstr "Tirages" msgid "Total" msgstr "Total" -#: o/skins/my_cart_template.pt:80 o/skins/sell_macros.pt:16 +#: o/skins/my_cart_template.pt:80 +msgid "Discount" +msgstr "Remise" + +#: o/skins/my_cart_template.pt:85 o/skins/sell_macros.pt:16 msgid "Shipping" msgstr "Livraison" -#: o/skins/my_cart_template.pt:85 +#: o/skins/my_cart_template.pt:90 msgid "VAT" msgstr "TVA" -#: o/skins/my_cart_template.pt:90 +#: o/skins/my_cart_template.pt:95 msgid "Total amount to pay" msgstr "Montant total à payer" -#: o/skins/my_cart_template.pt:114 +#: o/skins/my_cart_template.pt:119 msgid "Your cart is currently empty." msgstr "Votre panier est actuellement vide." diff --git a/locales/portfolio.pot b/locales/portfolio.pot index fd5694f..fca8f26 100644 --- a/locales/portfolio.pot +++ b/locales/portfolio.pot @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: 3.0\n" -"POT-Creation-Date: Fri Aug 29 13:55:35 2014\n" +"POT-Creation-Date: Fri Sep 5 00:23:02 2014\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Zope 3 Developers \n" @@ -106,15 +106,15 @@ msgstr "" msgid "Lightbox created." msgstr "" -#: o/skins/lightbox_view.py:53 +#: o/skins/lightbox_view.py:51 msgid "Photo removed." msgstr "" -#: o/skins/lightbox_view.py:55 +#: o/skins/lightbox_view.py:53 msgid "Removed photos." msgstr "" -#: o/skins/lightbox_view.py:57 +#: o/skins/lightbox_view.py:55 msgid "Nothing to remove." msgstr "" @@ -155,8 +155,8 @@ msgstr "" msgid "No more available copy of this photo and in this size." msgstr "" -#: o/skins/my_cart.py:138 -#: o/skins/my_cart_template.pt:113 +#: o/skins/my_cart.py:144 +#: o/skins/my_cart_template.pt:118 msgid "My cart" msgstr "" @@ -190,19 +190,23 @@ msgid "Total" msgstr "" #: o/skins/my_cart_template.pt:80 +msgid "Discount" +msgstr "" + +#: o/skins/my_cart_template.pt:85 #: o/skins/sell_macros.pt:16 msgid "Shipping" msgstr "" -#: o/skins/my_cart_template.pt:85 +#: o/skins/my_cart_template.pt:90 msgid "VAT" msgstr "" -#: o/skins/my_cart_template.pt:90 +#: o/skins/my_cart_template.pt:95 msgid "Total amount to pay" msgstr "" -#: o/skins/my_cart_template.pt:114 +#: o/skins/my_cart_template.pt:119 msgid "Your cart is currently empty." msgstr "" -- 2.20.1 From 821f2dd54fd8a66a73d7a4c8b99331fbe7476d86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Thu, 18 Sep 2014 14:59:18 +0200 Subject: [PATCH 06/16] maj et compilation traductions anglaises. --- locales/en/LC_MESSAGES/portfolio.mo | Bin 0 -> 6838 bytes locales/en/LC_MESSAGES/portfolio.po | 246 ++++++++++++++++------------ 2 files changed, 137 insertions(+), 109 deletions(-) create mode 100644 locales/en/LC_MESSAGES/portfolio.mo diff --git a/locales/en/LC_MESSAGES/portfolio.mo b/locales/en/LC_MESSAGES/portfolio.mo new file mode 100644 index 0000000000000000000000000000000000000000..8ba607f355f39645c2f86c789b9247e3ef2a4e54 GIT binary patch literal 6838 zcmeI0UyL199mfxpf-azd3JQY9(k&Ev?{2p(l)F&6-QBheyY15577NHSd*|%lp>t=h zGjn%)t0Y2vfP|Q!#Ypr45*2yqgMS_jAtWZCZ^jZ8Uoa-d7ap4U;=icz^PM@{?JhC# z(Zo*nH=pzW{Lb(9J7><_-(7dvi-spfK8>8-V2lc`x`G$a6CXC_IvBtmuz=UX@5Afi z>+ni=7G4A2gCBwCpoaJ-RQrv6Rrw9@G?9`&-{qjhv1v=YWQo>yQEeh=OSe+7r&l{C^kdpsY4<+wiIgFC5z9`1%eh0^cu zQ1fhHF|zNKPS&qGXLUWAIXSD@_hCfp3qLfQS#p8tRv z|566mxYtAJcM~K;%}%KCcEelX7`z!aq3rfFlpS7&vim!}ej|(7L;hAMz2>3DKLNGw z4&=`)^U}D_LfP$AsQNb{t}t&y^?L_mD)TPXcz=Yl(>W+R{1vhkvjJzR{yM1gn|yu? zlwSvY{%$yZi7|Vj?DGOI?Yr+lip+1J^m!j@{g+@QrZ87S&2tOXcr~c@yL|ZpsQ5Sr zwT=@|`e&ZYQ0w{HiGm&z$zj9sC3~HPcQ1SLkJ zdkL!j8&H0F8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Is$dZ1wAt>3mr|$gJU5}+iSP( zv5{GGEQlk{8YdOmjy7PwIS!OE^rZr;Dq0)^jj}pSliP}Fn+A#B@V4hTgVnj+C3IKf zsFUUlgWZ;bxLchyU+{+KDAEDYV0~LZ*b&#n1j+gVIroUrMPgLP)_)o*s}2|x_da4P zIvu0sfUC7}+C1UHMql*>BQD#dFhfsA(u#XI2Q^)k2dtOUW_%66OMIE#a%{6gfW{8G*p>6|`}Wt;Nr&<>I=E^L=)ssC0bIxv%zAfst0 zBOAUpOObZN%IX^?a|@18Y`QYZu50-aFnKFYVtjLhi7Z$r;n1_7=hBT`?JW-xQ?~E?BHNyXh&mk$PNu| z-$~or5foHs-&Do5!Fy`kciZhd8@uklb8u*Iuy2wRt~Q$mNgfA9nla+h$w|xQV%*+4 zJ~c8ixp!o2?8x}c%pRI1i(NiTwOJRm8}^a3Vc2 ipj)K+#lXjxTi!f(obskrUX$sfuX6QIhyU4I*S`U}!?RKV literal 0 HcmV?d00001 diff --git a/locales/en/LC_MESSAGES/portfolio.po b/locales/en/LC_MESSAGES/portfolio.po index e6d88cf..fe3e5c7 100644 --- a/locales/en/LC_MESSAGES/portfolio.po +++ b/locales/en/LC_MESSAGES/portfolio.po @@ -1,444 +1,472 @@ +# ############################################################################# +# +# Copyright (c) 2003-2004 Zope Foundation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# +# ############################################################################# +msgid "" +msgstr "" +"Project-Id-Version: 3.0\n" +"POT-Creation-Date: Fri Sep 5 00:23:02 2014\n" +"PO-Revision-Date: 2014-09-18 14:57+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zope 3 Developers \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: zope/app/locales/extract.py\n" + #: o/ImageManipulationTool.py:40 msgid "Processor" -msgstr "" +msgstr "Processor" #: o/ImageManipulationTool.py:56 msgid "Process started." -msgstr "" +msgstr "Process started." #: o/ImageManipulationTool.py:64 msgid "Process stopped." -msgstr "" +msgstr "Process stopped." #: o/skins/add_to_cart.py:20 o/skins/my_cart.py:73 msgid "You must enter an integer for quantity (found: %s)" -msgstr "" +msgstr "You must enter an integer for quantity (found: %s)" #: o/skins/add_to_cart.py:23 o/skins/my_cart.py:75 msgid "You must enter a positive value for quantity (found: %s)" -msgstr "" +msgstr "You must enter a positive value for quantity (found: %s)" #: o/skins/add_to_cart.py:49 o/skins/my_cart.py:85 msgid "Only %d available copies of this photo in this size." -msgstr "" +msgstr "Only %d available copies of this photo in this size." #: o/skins/add_to_cart.py:51 o/skins/my_cart.py:87 msgid "Only one last available copy of this photo in this size." -msgstr "" +msgstr "Only one last available copy of this photo in this size." #: o/skins/add_to_cart.py:53 msgid "No more available copy of this photo in this size." -msgstr "" +msgstr "No more available copy of this photo in this size." #: o/skins/add_to_cart.py:62 msgid "" "Your cart is locked:\n" "please complete your current order first." msgstr "" +"Your cart is locked:\n" +"please complete your current order first." #: o/skins/add_to_cart.py:72 o/skins/add_to_cart.py:74 msgid "Added to cart." -msgstr "" +msgstr "Added to cart." #: o/skins/add_to_selection.py:37 msgid "%s added to selection." -msgstr "" +msgstr "%s added to selection." #: o/skins/add_to_selection.py:39 msgid "This %s is already in the selection." -msgstr "" +msgstr "This %s is already in the selection." #: o/skins/get_slide_buyable_items.pt:21 o/skins/photo_layout_macros.pt:51 #: o/skins/photo_layout_macros.pt:54 o/skins/photo_view.pt:91 #: o/skins/photo_view.pt:94 msgid "Add to cart" -msgstr "" +msgstr "Add to cart" #: o/skins/get_slide_buyable_items.pt:27 msgid "quantity:" -msgstr "" +msgstr "quantity:" #: o/skins/get_slide_buyable_items.pt:34 msgid "Cancel" -msgstr "" +msgstr "Cancel" #: o/skins/lightbox_save_control.py:10 msgid "No photo selected." -msgstr "" +msgstr "No photo selected." #: o/skins/lightbox_save_control.py:21 msgid "You must enter a title." -msgstr "" +msgstr "You must enter a title." #: o/skins/lightbox_save_control.py:27 msgid "Lightbox created." -msgstr "" +msgstr "Lightbox created." #: o/skins/lightbox_view.py:51 msgid "Photo removed." -msgstr "" +msgstr "Photo removed." #: o/skins/lightbox_view.py:53 msgid "Removed photos." -msgstr "" +msgstr "Removed photos." #: o/skins/lightbox_view.py:55 msgid "Nothing to remove." -msgstr "" +msgstr "Nothing to remove." #. Default: "" #: o/skins/lightbox_view_template.pt:19 msgid "lightbox_selected_explanations" -msgstr "" +msgstr "This light box is selected: images that you select now will automatically be saved in that location." #: o/skins/lightbox_view_template.pt:24 o/skins/my_cart_template.pt:59 #: o/skins/portfolio_view.pt:88 o/skins/selection_view_template.pt:31 msgid "delete" -msgstr "" +msgstr "delete" #: o/skins/lightbox_view_template.pt:31 o/skins/selection_view_template.pt:20 msgid "${DYNAMIC_CONTENT}" -msgstr "" +msgstr "${DYNAMIC_CONTENT}" #: o/skins/metadata_edit_form_macros.pt:258 msgid "Save" -msgstr "" +msgstr "Save" #: o/skins/my_cart.py:58 msgid "Order >>" -msgstr "" +msgstr "Order >>" #: o/skins/my_cart.py:60 msgid "Shipping >>" -msgstr "" +msgstr "Shipping >>" #: o/skins/my_cart.py:89 msgid "No more available copy of this photo and in this size." -msgstr "" +msgstr "No more available copy of this photo and in this size." #: o/skins/my_cart.py:144 o/skins/my_cart_template.pt:118 msgid "My cart" -msgstr "" +msgstr "My cart" #: o/skins/my_cart_template.pt:26 msgid "Image" -msgstr "" +msgstr "Image" #: o/skins/my_cart_template.pt:27 msgid "Printing format and type" -msgstr "" +msgstr "Printing format and type" #: o/skins/my_cart_template.pt:28 msgid "Quantity" -msgstr "" +msgstr "Quantity" #: o/skins/my_cart_template.pt:29 msgid "Amount (incl tax)" -msgstr "" +msgstr "Amount (incl tax)" #: o/skins/my_cart_template.pt:53 msgid "refresh amount" -msgstr "" +msgstr "refresh amount" #: o/skins/my_cart_template.pt:69 msgid "Prints" -msgstr "" +msgstr "Prints" #: o/skins/my_cart_template.pt:70 msgid "Total" -msgstr "" +msgstr "Total" #: o/skins/my_cart_template.pt:80 msgid "Discount" -msgstr "" +msgstr "Discount" #: o/skins/my_cart_template.pt:85 o/skins/sell_macros.pt:16 msgid "Shipping" -msgstr "" +msgstr "Shipping" #: o/skins/my_cart_template.pt:90 msgid "VAT" -msgstr "" +msgstr "VAT" #: o/skins/my_cart_template.pt:95 msgid "Total amount to pay" -msgstr "" +msgstr "Total amount to pay" #: o/skins/my_cart_template.pt:119 msgid "Your cart is currently empty." -msgstr "" +msgstr "Your cart is currently empty." #: o/skins/photo_info.pt:9 msgid "Preview:" -msgstr "" +msgstr "Preview:" #: o/skins/photo_info.pt:18 o/skins/save_as_lightbox_template.pt:15 msgid "Title" -msgstr "" +msgstr "Title" #: o/skins/photo_info.pt:22 msgid "Type" -msgstr "" +msgstr "Type" #: o/skins/photo_info.pt:26 msgid "Created" -msgstr "" +msgstr "Created" #: o/skins/photo_info.pt:30 msgid "Modified" -msgstr "" +msgstr "Modified" #: o/skins/photo_info.pt:34 msgid "Dimensions" -msgstr "" +msgstr "Dimensions" #: o/skins/photo_layout_macros.pt:32 o/skins/photo_layout_macros.pt:35 msgid "Add to selection" -msgstr "" +msgstr "Add to selection" #: o/skins/photo_layout_macros.pt:41 o/skins/photo_layout_macros.pt:44 msgid "Remove to selection" -msgstr "" +msgstr "Remove to selection" #: o/skins/photo_layout_macros.pt:60 o/skins/photo_layout_macros.pt:63 #: o/skins/portfolio_presentation_template.pt:47 msgid "Delete" -msgstr "" +msgstr "Delete" #: o/skins/photo_layout_macros.pt:78 o/skins/photo_layout_macros.pt:81 msgid "Hide for anonymous" -msgstr "" +msgstr "Hide for anonymous" #: o/skins/photo_layout_macros.pt:91 o/skins/photo_layout_macros.pt:94 msgid "Show for anonymous" -msgstr "" +msgstr "Show for anonymous" #: o/skins/photo_medium.pt:37 o/skins/photo_medium.pt:38 msgid "previous" -msgstr "" +msgstr "previous" #: o/skins/photo_medium.pt:44 o/skins/photo_medium.pt:45 msgid "next" -msgstr "" +msgstr "next" #: o/skins/photo_medium.pt:52 msgid "zoom in" -msgstr "" +msgstr "zoom in" #: o/skins/photo_medium.pt:52 msgid "zoom out" -msgstr "" +msgstr "zoom out" #: o/skins/photo_view.pt:31 msgid "Empty image: upload an image file in \"Edit\" tab." -msgstr "" +msgstr "Empty image: upload an image file in \"Edit\" tab." #: o/skins/photo_view.pt:46 o/skins/photo_view.pt:49 msgid "Previous" -msgstr "" +msgstr "Previous" #: o/skins/photo_view.pt:52 o/skins/photo_view.pt:55 msgid "Next" -msgstr "" +msgstr "Next" #: o/skins/photo_view.pt:58 msgid "slide show" -msgstr "" +msgstr "slide show" #: o/skins/photo_view.pt:69 o/skins/photo_view.pt:72 msgid "Back to portfolio..." -msgstr "" +msgstr "Back to portfolio..." #: o/skins/photo_view.pt:75 o/skins/photo_view.pt:77 msgid "Full screen (f)" -msgstr "" +msgstr "Full screen (f)" #: o/skins/photo_view.pt:99 o/skins/photo_view.pt:104 msgid "Edit metadata" -msgstr "" +msgstr "Edit metadata" #: o/skins/photo_view.pt:118 msgid "Keywords" -msgstr "" +msgstr "Keywords" #: o/skins/photo_view.pt:125 msgid "reference:" -msgstr "" +msgstr "reference:" #: o/skins/photo_view.pt:131 msgid "download picture" -msgstr "" +msgstr "download picture" #: o/skins/portfolio_edit_form.py:17 msgid "Photo deleted." -msgstr "" +msgstr "Photo deleted." #: o/skins/portfolio_edit_form.py:19 msgid "Deleted photos." -msgstr "" +msgstr "Deleted photos." #: o/skins/portfolio_edit_form.py:22 msgid "Nothing to delete." -msgstr "" +msgstr "Nothing to delete." #: o/skins/portfolio_presentation_template.pt:22 msgid "Delete presentation" -msgstr "" +msgstr "Delete presentation" #: o/skins/portfolio_view.pt:74 msgid "sorting:" -msgstr "" +msgstr "sorting:" #: o/skins/portfolio_view.pt:77 msgid "manual" -msgstr "" +msgstr "manual" #: o/skins/portfolio_view.pt:79 msgid "shooting" -msgstr "" +msgstr "shooting" #: o/skins/portfolio_view.pt:81 msgid "modification" -msgstr "" +msgstr "modification" #: o/skins/save_as_lightbox_template.pt:12 msgid "Save current selection as lightbox" -msgstr "" +msgstr "Save current selection as lightbox" #: o/skins/save_as_lightbox_template.pt:21 msgid "Description" -msgstr "" +msgstr "Description" #: o/skins/selection_view.py:56 msgid "Photo deselected." -msgstr "" +msgstr "Photo deselected." #: o/skins/selection_view.py:58 msgid "Deselected photos." -msgstr "" +msgstr "Deselected photos." #: o/skins/selection_view.py:60 msgid "Nothing to deselect." -msgstr "" +msgstr "Nothing to deselect." #: o/skins/selection_view.py:70 o/skins/selection_view.py:72 #: o/skins/selection_view_template.pt:18 o/skins/selectioncontext.py:116 #: o/skins/selectioncontext.py:118 msgid "My selection" -msgstr "" +msgstr "My selection" #: o/skins/selection_view_template.pt:23 msgid "You are editing this ligthbox:" -msgstr "" +msgstr "You are editing this ligthbox:" #: o/skins/selection_view_template.pt:42 msgid "Save as..." -msgstr "" +msgstr "Save as..." #: o/skins/selection_view_template.pt:45 msgid "${please_login} if you want to save this selection." -msgstr "" +msgstr "${please_login} if you want to save this selection." #. Default: "Please log in" #: o/skins/selection_view_template.pt:46 msgid "login_to_save_seletion" -msgstr "" +msgstr "login_to_save_seletion" #: o/skins/selection_view_template.pt:50 msgid "Empty selection." -msgstr "" +msgstr "Empty selection." #: o/skins/sell_macros.pt:14 msgid "Cart" -msgstr "" +msgstr "Cart" #: o/skins/sell_macros.pt:15 msgid "Authentication" -msgstr "" +msgstr "Authentication" #: o/skins/sell_macros.pt:17 msgid "Payment" -msgstr "" +msgstr "Payment" #: o/skins/sell_macros.pt:18 msgid "Confirmation" -msgstr "" +msgstr "Confirmation" #: o/skins/shipping_set_control.py:8 msgid "Please enter a name." -msgstr "" +msgstr "Please enter a name." #: o/skins/shipping_set_control.py:9 msgid "Please enter an address." -msgstr "" +msgstr "Please enter an address." #: o/skins/shipping_set_control.py:10 msgid "Please enter a city." -msgstr "" +msgstr "Please enter a city." #: o/skins/shipping_set_control.py:11 msgid "Please enter zip code." -msgstr "" +msgstr "Please enter zip code." #: o/skins/shipping_set_control.py:12 msgid "Please enter a country." -msgstr "" +msgstr "Please enter a country." #: o/skins/shipping_set_control.py:27 msgid "No cart found. Your session may have expired." -msgstr "" +msgstr "No cart found. Your session may have expired." #: o/skins/shipping_set_control.py:30 msgid "Shipping informations saved." -msgstr "" +msgstr "Shipping informations saved." #: o/skins/shipping_template.pt:14 msgid "Please set shipping informations" -msgstr "" +msgstr "Please set shipping informations" #: o/skins/shipping_template.pt:19 o/skins/shipping_template.pt:60 msgid "Validate >>" -msgstr "" +msgstr "Validate >>" #: o/skins/shipping_template.pt:23 msgid "Fullname" -msgstr "" +msgstr "Fullname" #: o/skins/shipping_template.pt:29 msgid "Address" -msgstr "" +msgstr "Address" #: o/skins/shipping_template.pt:36 msgid "City" -msgstr "" +msgstr "City" #: o/skins/shipping_template.pt:42 msgid "Zip code" -msgstr "" +msgstr "Zip code" #: o/skins/shipping_template.pt:48 msgid "Country" -msgstr "" +msgstr "Country" #: o/skins/zoom_view.pt:32 msgid "back" -msgstr "" +msgstr "back" # from portfolio-manual msgid "not saved yet" -msgstr "" +msgstr "not saved yet" msgid "Load in my selection" -msgstr "" +msgstr "Load in my selection" msgid "Unload from my selection" -msgstr "" +msgstr "Unload from my selection" msgid "My albums" -msgstr "" +msgstr "My albums" msgid "You don't have any album yet." -msgstr "" +msgstr "You don't have any album yet." +# date et heure de prise de vue msgid "%m/%d/%Y %H:%M:%S" -msgstr "" +msgstr "%m/%d/%Y %H:%M:%S" -- 2.20.1 From 20d32cad15428a0a8d893a8e248d925b004df2c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Thu, 9 Oct 2014 18:18:41 +0200 Subject: [PATCH 07/16] =?utf8?q?Effacement=20de=20la=20s=C3=A9lection=20qu?= =?utf8?q?and=20le=20d=C3=A9placement=20est=20effectif=20(valid=C3=A9=20pa?= =?utf8?q?r=20le=20serveur).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_lightbox_viewer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 3c69aec..97c7f79 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -542,15 +542,18 @@ Lightbox.prototype.moveSelectedPhotos = function() { }; Lightbox.prototype._moveSelectedPhotos = function(req) { - var i, slide; + var i, slide, cb; if (req.status === 200) { var doc = req.responseXML.documentElement; if (doc.nodeName === 'ok') { - this.pendingMovedSlides = undefined; for(i=0 ; i Date: Fri, 10 Oct 2014 10:54:04 +0200 Subject: [PATCH 08/16] bugfix. --- skins/photo_lightbox_viewer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 97c7f79..3438151 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -482,10 +482,10 @@ Lightbox.prototype.onDragStart = function(evt) { Lightbox.prototype.onDragOver = function(evt) { var target = getTargetedObject(evt); - if (!target) {return;} - while(target.className !== 'slide') { + while(target && target.className !== 'slide') { target = target.parentNode; } + if (!target) {return;} target = target.parentNode; if (target !== this.dragged) { target.classList.add('dragover'); -- 2.20.1 From 578b0986d2b8fbcc52fb6a38961a568469046e85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 10 Oct 2014 11:27:59 +0200 Subject: [PATCH 09/16] =?utf8?q?D=C3=A9sactivation=20du=20dragover=20si=20?= =?utf8?q?rien=20n'est=20s=C3=A9lectionn=C3=A9=C2=A0:=C2=A0se=20produit=20?= =?utf8?q?lors=20d'un=20upload=20par=20drag=20and=20drop.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_lightbox_viewer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 3438151..024e01e 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -481,6 +481,9 @@ Lightbox.prototype.onDragStart = function(evt) { }; Lightbox.prototype.onDragOver = function(evt) { + if (!this.dragged) { + return; + } var target = getTargetedObject(evt); while(target && target.className !== 'slide') { target = target.parentNode; -- 2.20.1 From 8e1a01f483d5572199464ed072747ba998bb978f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 10 Oct 2014 11:30:40 +0200 Subject: [PATCH 10/16] jslint --- skins/photo_lightbox_viewer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index 024e01e..e0f304d 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -527,21 +527,21 @@ Lightbox.prototype.moveSelectedPhotos = function() { break; case 4 : hideProgressImage(); - self._moveSelectedPhotos(req) + self._moveSelectedPhotos(req); break; } }; var url = absolute_url() + '/portfolio_move_photos'; - req.open("POST", url, true); - req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); + req.open("POST", url, true); + req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); var query = 'container_type=' + this.container_type; var i; for (i=0 ; i Date: Fri, 10 Oct 2014 13:00:26 +0200 Subject: [PATCH 11/16] jslint --- skins/cart_listing.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/skins/cart_listing.js b/skins/cart_listing.js index 593002a..cf160c3 100644 --- a/skins/cart_listing.js +++ b/skins/cart_listing.js @@ -9,39 +9,39 @@ var CartListing; (function(){ var ENTERKEY = 13; -CartListing = function(table) { +CartListing = function(table) { var thisCL = this; this.table = table; var form = table.parentNode; - while(form.tagName != 'FORM') - form = form.parentNode; + while(form.tagName !== 'FORM') { + form = form.parentNode;} this.fm = new FormManager(form); - if (browser.isIE) - addListener(table, 'focusout', function(evt){thisCL.updateRow(evt);}); - else - addListener(table, 'change', function(evt){thisCL.updateRow(evt);}); + if (browser.isIE){ + addListener(table, 'focusout', function(evt){thisCL.updateRow(evt);});} + else{ + addListener(table, 'change', function(evt){thisCL.updateRow(evt);});} addListener(table, 'keypress', function(evt){thisCL.onKeypress(evt);}); -} +}; CartListing.prototype.updateRow = function(evt) { var target = getTargetedObject(evt); - if (target.tagName != 'INPUT') - return; + if (target.tagName !== 'INPUT'){ + return;} var row = target.parentNode.parentNode; - var inputs = row.getElementsByTagName('input') + var inputs = row.getElementsByTagName('input'); var refreshBtn = inputs[1]; this.fm.submitButton = refreshBtn; this.fm.submit(evt); }; CartListing.prototype.onKeypress = function(evt){ - if (evt.keyCode == ENTERKEY) - this.updateRow(evt); + if (evt.keyCode === ENTERKEY){ + this.updateRow(evt);} }; -})(); \ No newline at end of file +}()); -- 2.20.1 From 1a791f652fc028bbb22d800351ce748a7c56974f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 10 Oct 2014 13:07:05 +0200 Subject: [PATCH 12/16] jslint --- skins/cart_widgets.js | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/skins/cart_widgets.js b/skins/cart_widgets.js index 594fd22..9f59306 100644 --- a/skins/cart_widgets.js +++ b/skins/cart_widgets.js @@ -19,7 +19,7 @@ CartWidget = function(slide, url) { req.send(null); hideProgressImage(); - if (req.status != 200){ + if (req.status !== 200){ alert(req.status); return; } @@ -27,12 +27,12 @@ CartWidget = function(slide, url) { var wdgtNode = this.wdgtNode = getCopyOfNode(doc); slide.appendChild(wdgtNode); - var descriptions = this.descriptions = new Array(); + var descriptions = this.descriptions = []; var divs = wdgtNode.getElementsByTagName('div'); - var d; - for (var i=0; i Date: Fri, 10 Oct 2014 16:11:10 +0200 Subject: [PATCH 13/16] jslint --- skins/photo_film_viewer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/photo_film_viewer.js b/skins/photo_film_viewer.js index c6f583b..fa929b2 100644 --- a/skins/photo_film_viewer.js +++ b/skins/photo_film_viewer.js @@ -211,9 +211,9 @@ FilmSlider.prototype.getBestFitSize = function(ratio) { }; FilmSlider.prototype.adjustImage = function(img) { - var dispWidth = parseInt(this.stretchable.style.width); + var dispWidth = parseInt(this.stretchable.style.width, 10); var imgWidth = img.naturalWidth; - var dispHeight = parseInt(this.stretchable.style.height); + var dispHeight = parseInt(this.stretchable.style.height, 10); var imgHeight = img.naturalHeight; var ratio; -- 2.20.1 From bf33c9ca85d7668e07e0a98d7af0be131d665b31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 10 Oct 2014 17:16:17 +0200 Subject: [PATCH 14/16] =?utf8?q?Activation=20de=20l'ordonnancement=20par?= =?utf8?q?=20drag=20and=20drop=20que=20quand=20c'est=20possible=20(permiss?= =?utf8?q?ions,=20crit=C3=A8re=20de=20tri).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_layout_macros.pt | 10 +++++++--- skins/photo_lightbox_viewer.js | 26 ++++++++++++++++++++++---- skins/portfolio_view.pt | 2 ++ 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/skins/photo_layout_macros.pt b/skins/photo_layout_macros.pt index 7960516..f68f193 100644 --- a/skins/photo_layout_macros.pt +++ b/skins/photo_layout_macros.pt @@ -9,7 +9,9 @@

diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index e0f304d..ba3ecf1 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -11,7 +11,7 @@ var Lightbox; var reSelected = /.*selected.*/; -Lightbox = function(grid, toolbar, complete, container_type) { +Lightbox = function(grid, toolbar, complete, container_type, orderable) { var self = this; this.grid = grid; this._buildSlidesIndex(); // set this.slides and this.lastSlide; @@ -48,9 +48,11 @@ Lightbox = function(grid, toolbar, complete, container_type) { // drag and drop this.disableDefaultDragging(); - addListener(this.grid, 'dragstart', function(evt){self.onDragStart(evt);}); - addListener(this.grid, 'dragover', function(evt){self.onDragOver(evt);}); - addListener(this.grid, 'dragend', function(evt){self.onDragEnd(evt);}); + this._DDOrderingListeners = {'dragstart' : function(evt){self.onDragStart(evt);}, + 'dragover' : function(evt){self.onDragOver(evt);}, + 'dragend' : function(evt){self.onDragEnd(evt);} + }; + if(orderable) {this.enableDDOrdering();} }; Lightbox.prototype._buildSlidesIndex = function() { @@ -76,6 +78,7 @@ Lightbox.prototype.windowScrollToolbarlHandler = function(evt) { this.switchToolBarPositioning(false); } }; + Lightbox.prototype.windowScrollGridHandler = function(evt) { if (!this.complete && !this.fetchingDisabled && @@ -180,6 +183,8 @@ Lightbox.prototype.mouseClickHandler = function(evt) { Lightbox.prototype.onChangeHandler = function(evt) { var target = getTargetedObject(evt); if (target.name === 'sort_on') { + if (target.value === 'position') {this.enableDDOrdering();} + else {this.disableDDOrdering();} this.fm.submitButton = {'name' : 'set_sorting', 'value' : 'ok'}; this.fm.submit(evt); } @@ -464,6 +469,19 @@ Lightbox.prototype.getSelectedSlides = function() { return slides; }; + +Lightbox.prototype.enableDDOrdering = function() { + addListener(this.grid, 'dragstart', this._DDOrderingListeners.dragstart); + addListener(this.grid, 'dragover', this._DDOrderingListeners.dragover); + addListener(this.grid, 'dragend', this._DDOrderingListeners.dragend); +}; + +Lightbox.prototype.disableDDOrdering = function() { + removeListener(this.grid, 'dragstart', this._DDOrderingListeners.dragstart); + removeListener(this.grid, 'dragover', this._DDOrderingListeners.dragover); + removeListener(this.grid, 'dragend', this._DDOrderingListeners.dragend); +}; + Lightbox.prototype.onDragStart = function(evt) { var target = getTargetedObject(evt); this.dragged = target; diff --git a/skins/portfolio_view.pt b/skins/portfolio_view.pt index 06de5c3..a194d6f 100644 --- a/skins/portfolio_view.pt +++ b/skins/portfolio_view.pt @@ -28,7 +28,9 @@
Date: Tue, 14 Apr 2015 09:48:51 +0200 Subject: [PATCH 16/16] =?utf8?q?M=C3=A9nage,=20lint.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Products/Portfolio/skins/photo_lightbox_viewer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Products/Portfolio/skins/photo_lightbox_viewer.js b/Products/Portfolio/skins/photo_lightbox_viewer.js index ba3ecf1..8b19c3f 100644 --- a/Products/Portfolio/skins/photo_lightbox_viewer.js +++ b/Products/Portfolio/skins/photo_lightbox_viewer.js @@ -24,7 +24,7 @@ Lightbox = function(grid, toolbar, complete, container_type, orderable) { addListener(window, 'scroll', function(evt){self.windowScrollToolbarlHandler(evt);}); } addListener(window, 'scroll', function(evt){self.windowScrollGridHandler(evt);}); - registerStartupFunction(function(){ self.windowScrollGridHandler();}); + addListener(window, 'load', function(evt){self.windowScrollGridHandler();}); this.lastCBChecked = undefined; this.form = undefined; var parent = this.grid.parentNode; @@ -82,9 +82,7 @@ Lightbox.prototype.windowScrollToolbarlHandler = function(evt) { Lightbox.prototype.windowScrollGridHandler = function(evt) { if (!this.complete && !this.fetchingDisabled && - getWindowScrollY() > - (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop - - getWindowHeight()) { + getWindowScrollY() > (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop - getWindowHeight()) { this.fetchingDisabled = true; this.fetchTail(); } -- 2.20.1