This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
/*global _:false */ | |
/*global angular:false */ | |
/*global SWIF_RESOURCES_VERSION:false */ | |
/*jshint latedef:false */ | |
/* config.json file available throw settings.app: | |
"resources": { | |
"scripts": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global _:false */ | |
/** | |
* nom | |
* code | |
* type | |
* Site parent | |
* Service mainteneur | |
* long | |
* lat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var openimginoverlay = function(){ | |
$('img[src$="image_tile"],img[src$="image_thumb"],img[src$="image_mini"],img[src$="image_preview"]') | |
.each(function(){ | |
var $this = $(this); | |
if (!$this.parent().is('a')){ | |
$this.prepOverlay({ | |
subtype: 'image', | |
urlmatch: '/image_.+$', | |
urlreplace: '', | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zope.annotation.interfaces import IAnnotations | |
from persistent.list import PersistentList | |
from Products.CMFCore.utils import getToolByName | |
FAVBY = "collective.favoriting.favoritedby" | |
def setupAnnotations(context): | |
""" | |
set up the annotations if they haven't been set up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getToolByName(obj, name, default=_marker): | |
""" Get the tool, 'toolname', by acquiring it. | |
o Application code should use this method, rather than simply | |
acquiring the tool by name, to ease forward migration (e.g., | |
to Zope3). | |
""" | |
tool_interface = _tool_interface_registry.get(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catalog = container.portal_catalog | |
types = container.portal_types.objectIds() | |
views = {} | |
for t in types: | |
brains = catalog(portal_type=t) | |
for brain in brains: | |
ob = brain.getObject() | |
layout = ob.getLayout() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def upgrade_fss2attr_storage(portal_setup): | |
"""We use fss on plone3, so we need first to come back to default | |
plone so the migration of plone will next do the job to go on blob""" | |
site = portal_setup.aq_parent | |
#fss2attributestorage | |
from cStringIO import StringIO | |
from Products.Archetypes.Storage import AttributeStorage | |
from iw.fss.FileSystemStorage import FileSystemStorage | |
# attr_storage = AttributeStorage() | |
fss_storage = FileSystemStorage() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zope.publisher.interfaces.browser import IDefaultBrowserLayer,\ | |
IBrowserPublisher | |
from zope.component.hooks import setSite | |
import zope.interface | |
from zope.component._api import getAdapters | |
import shutil | |
import os | |
from Testing import makerequest | |
portal = app.restrictedTraverse('adria-rcse') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this as python scrip tin the ZMI | |
res = "CONTENT OF THE FILE GOOGLE HAS GAVE YOU" | |
context.REQUEST.response.setHeader('X-Theme-Disabled', 'True') | |
return res |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ported by Matt Sullivan http://sullerton.com/2011/03/django-mobile-browser-detection-middleware/ | |
import re | |
from Products.Five.browser import BrowserView | |
reg_b = re.compile(r"(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", re.I|re.M) | |
reg_v = re.compile(r"1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta) |
NewerOlder